Apollo-android: Incompatibility with Android Studio 4

Created on 21 Jan 2020  路  6Comments  路  Source: apollographql/apollo-android

Summary
A clear and concise description of what the bug is.

Description
Steps to reproduce:

  1. Create a new app in Android Studio 4 (currently 4.0 canary 8)
  2. Add apollographql to the build.gradle files
    Result:
    Gradle reports an issue with the app's build.gradle:

A problem occurred evaluating project ':app'.
Plugin with id 'com.apollographql.apollo' not found.

Version
Android Studio 4.0 canary 8
apollo-gradle-plugin:1.2.3

Bug

All 6 comments

'com.apollographql.apollo' is introduced in version 1.3.x. Use 'com.apollographql.android' in version 1.2.x

The readme at https://github.com/apollographql/apollo-android says "The latest Gradle plugin version is 1.2.3", but should I use 1.3.X instead for "com.apollographql.apollo:apollo-gradle-plugin:x.y.z" ?

If I change to com.apollographql.android, I get this error:

Could not resolve all artifacts for configuration ':classpath'.
Could not find com.apollographql.android:apollo-gradle-plugin:1.2.3.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/apollographql/android/apollo-gradle-plugin/1.2.3/apollo-gradle-plugin-1.2.3.pom
- https://jcenter.bintray.com/com/apollographql/android/apollo-gradle-plugin/1.2.3/apollo-gradle-plugin-1.2.3.pom

The classpath needs to be com.apollographql.apollo:apollo-gradle-plugin instead of com.apollographql.android:apollo-gradle-plugin

Sorry for the confusion. We are preparing the version 1.3.0 and it is almost released. That's why there is some confusion in README.

Please follow the instructions in the latest release tag README

https://github.com/apollographql/apollo-android/tree/v1.2.3

Yep, sorry about that, master is always the latest development branch and might become a bit out of sync with the latest release. Next time, I guess we could postpone updating the docs until the release is made.

Was this page helpful?
0 / 5 - 0 ratings