Android build with support library 23.1.1

Hi,
I’m trying to build an android project with some 23.1.1 dependencies, e.g. android support appcompat-v7, but I’ve this error:

> Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not find com.android.support:appcompat-v7:23.1.1.
 Searched in the following locations:

 https://jcenter.bintray.com/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom
 https://jcenter.bintray.com/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar
 https://jitpack.io/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom
 https://jitpack.io/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar
 file:/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom
 file:/usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar
 file:/usr/local/android-sdk-linux/extras/google/m2repository/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.pom
 file:/usr/local/android-sdk-linux/extras/google/m2repository/com/android/support/appcompat-v7/23.1.1/appcompat-v7-23.1.1.jar

 Required by:
 myapp-android:app:unspecified

I’ve seen that the pre-downloaded library inside the container has not yet updated to this latest release: inside /usr/local/android-sdk-linux/extras/android/m2repository/com/android/support/appcompat-v7/, the latest version is 23.1.0

So, I’ve tried updating it manually during the build, adding these lines to my circle.yml file:
pre:

  • echo y | android update sdk --no-ui --all --filter “extra-android-support” to my circle.yml file, but nothing changed

From the initial dependencies phase output seems that all is ok:

Do you accept the license 'android-sdk-license-5be876d5' [y/n]: 
Installing Archives:
Preparing to install archives
Downloading Android Support Library, revision 23.1.1
Installing Android Support Library, revision 23.1.1
Installed Android Support Library, revision 23.1.1
    Done. 1 package installed.

But when the build executes the gradle dependencies phase I’ve got the same errore reported above.

Do you know if an update for the circleci android environment is planned?
Am I missing something with the build configuration?

Thanks

Are you sure the error is exactly the same even after running echo y | android update sdk --no-ui --all --filter "extra-android-support"? Could you please try installing all the dependencies that could potentially be related to the support library 23.*? Something like this should do it:

dependencies:
  pre:
    - echo y | android update sdk --no-ui --all --filter tool,extra-android-m2repository,extra-android-support,extra-google-google_play_services,extra-google-m2repository,android-23
    - echo y | android update sdk --no-ui --all --filter build-tools-23.0.2

Please let me know if that helps.

extra-android-m2repository (not extra-android-support) is the filter you need for your gradle builds.

Using only “extra-android-m2repository” it works as expected.

Thank you.

1 Like