Skip to content Skip to sidebar Skip to footer

Apollo Android Client - Cannot Access Generated Classes On Classpath

I've generated the Apollo classes successfully and can see them in the build directory, however they're not available on the classpath. Strangely the Enum that is generated is ava

Solution 1:

Right now, you have src/main/graphql/ containing GraphQL documents. That means that your Java classes will be generated with no Java package, which probably is not what you want.

Instead, create a package tree under src/main/graphql/ (e.g., src/main/graphql/apollotest/mq/apollotest/api/). Move the GraphQL documents and schema.json there. Clean the project, and you should find that your Apollo-generated classes are available to you in whatever Java package you chose (e.g., apollotest.mq.apollotest.api in the above example).

Solution 2:

Post a Comment for "Apollo Android Client - Cannot Access Generated Classes On Classpath"