NovatecConsulting / fastlane-plugin-android_sdk_update

🚀 Fastlane plugin to install and update required Android-SDK packages
MIT License
10 stars 5 forks source link

Plugin unable to locate ConstraintLayout within SDK Repository #2

Closed DSmith09 closed 7 years ago

DSmith09 commented 7 years ago

Ran across this issue earlier today with integrating the plugin within our current project:

Could not find any matches for com.android.support.constraint:constraint-layout:+ as no versions of com.android.support.constraint:constraint-layout are available

Searched in the following locations:

file:/usr/local/Caskroom/android-sdk/3859397/extras/android/m2repository/com/android/support/constraint/constraint-layout/maven-metadata.xml

file:/usr/local/Caskroom/android-sdk/3859397/extras/android/m2repository/com/android/support/constraint/constraint-layout/

From this information it looks like the plugin is attempting to point the location of the ConstraintLayout within extras/android/m2repository/ but it should be located in extras/m2repository

This ticket for Bazel seems to identify the issue in more detail: https://github.com/bazelbuild/bazel/issues/2830

m-ruhl commented 7 years ago

Did you specified the constraint-layoit as _additionalpackages? "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"

The constraint-layout is not located in the standard-android-extra repository.

To find the packages, you can use: sdkmanager --list --verbose

Regards Michael

DSmith09 commented 7 years ago

My apologies, I was under the impression that it was in the extras;android;m2repository package. Adding the additional package seems to have resolved my issue. Thanks!

polaroidkidd commented 6 years ago

Hi, I'm running into the same issue but am a bit lost where I can add the constraint-layout as an additional package. A small pointer where I could do this would be much appreciated!

m-ruhl commented 6 years ago

Hi @polaroidkidd,

it would look like this:

android_sdk_update(
    additional_packages: ["extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"]
)

Hope it helps 😉

polaroidkidd commented 6 years ago

@m-ruhl thanks for the help. I'm not sure which file to put this in. I briefly tried putting it in the BUILD file but kept on getting build errors. Is there a spacial place on the build file or do I put it in the android Build.Gradle file?

m-ruhl commented 6 years ago

It has to be in the Fastfile

Here is an example: https://github.com/NovaTecConsulting/fastlane-plugin-android_sdk_update/blob/master/fastlane/Fastfile

My recommendation is in the before_all lane