-
Notifications
You must be signed in to change notification settings - Fork 656
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't initialize class okhttp3.internal.Util #3022
Comments
Hi 👋 That's due to Gradle putting an older version of the dependencies in the classpath. This is happening because the latest versions of AGP pull an older version of We're looking into packaging the plugin as a fat jar to avoid this. Another solution would be for the Android Gradle Plugin to update its dependencies. See https://issuetracker.google.com/issues/183511640 In the meantime, you can workaround this by putting the Apollo plugin next to the Android plugin in the root project build.gradle (see #2287 (comment) for more details). |
Thank you. Do I have to download the schema from the endpoint or can I also use SDL files directly or generate the JSON schema from the SDL files somehow? |
SDL is fine and I actually like it better than json for a lot of reasons. It's still the early days of SDL in Apollo Android so it's not as battle-tested as Json but it should work well and is way more readable. |
I'm going to assume the solution to put the Apollo plugin next to the Android plugin worked and close this one. Please let me know if you want me to reopen it. |
Summary
I was following the Get started with kotlin guide and failed downloading the schema using the following command:
./gradlew downloadApolloSchema --endpoint="localhost:8080/api" --schema="src/main/graphql/com/example/schema.json"
Version
I used version 2.5.5 everywhere where I needed to specify a version.
These are the relevant parts of my app build.gradle:
$apollo_version
is set to 2.5.5 as well.I am using Android Studio Arctic Fox 2020.3.1 Canary Fox 10 on windows. The project is using Jetpack Compose if that is relevant.
I wasn't sure where to put the
apollo { ... }
block so I also tried putting it outside theandroid { ... }
block which resulted in the same issue.Description
Below is the full error I got. I was also wondering whether I can just supply the SDL file myself without downloading it from an endpoint. It is part of the same repository so I could easily supply it like that. Do I need to convert it to a
.json
file and is there a way to do that without downloading it?Thanks for your help.
-Moritz
The text was updated successfully, but these errors were encountered: