apollographql / apollo-kotlin

:rocket:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.76k stars 653 forks source link

Apollo Android build issues #1150

Closed snijsure closed 5 years ago

snijsure commented 5 years ago

Anybody else seen this issue while using alpha3?

In my project suddenly I am getting these errors.

   > Could not find com.android.tools:common:25.3.3.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/android/tools/common/25.3.3/common-25.3.3.pom
       - https://dl.google.com/dl/android/maven2/com/android/tools/common/25.3.3/common-25.3.3.jar
       - https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.pom
       - https://jcenter.bintray.com/com/android/tools/common/25.3.3/common-25.3.3.jar
       - https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/common/25.3.3/common-25.3.3.pom
       - https://oss.sonatype.org/content/repositories/snapshots/com/android/tools/common/25.3.3/common-25.3.3.jar
       - https://kotlin.bintray.com/kotlinx/com/android/tools/common/25.3.3/common-25.3.3.pom
       - https://kotlin.bintray.com/kotlinx/com/android/tools/common/25.3.3/common-25.3.3.jar
     Required by:
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.build:manifest-merger:25.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.ddms:ddmlib:25.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:shared:25.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools.analytics-library:tracker:25.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools.layoutlib:layoutlib-api:25.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:dvlib:25.3.3
         project :openplanet > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3 > com.android.tools.build:gradle:2.3.3 > com.android.tools.build:gradle-core:2.3.3 > com.android.tools.build:builder:2.3.3 > com.android.tools:sdklib:25.3.3 > com.android.tools:repository:25.3.3
mwajeeh commented 5 years ago

I am getting similar error:

 > Could not find com.android.tools.build:gradle:2.3.3.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom
       - https://jcenter.bintray.com/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.jar
       - https://jitpack.io/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom
       - https://jitpack.io/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.jar
       - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom
       - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.jar
     Required by:
         project :baymax > com.apollographql.apollo:apollo-gradle-plugin:1.0.0-alpha3
mwajeeh commented 5 years ago

Adding maven { url "https://dl.bintray.com/android/android-tools" } to repositories fixed it.

lgawin commented 5 years ago

There are some issues with Google dependencies on JCenter (https://issuetracker.google.com/issues/120759347#comment36). They're still working on bringing deleted artifacts back, what @mwajeeh proposed ☝️is recommended workaround until it gets fixed.