Fixed
Status Update
Comments
vs...@google.com <vs...@google.com> #2
can you share your android studio version
mm...@commonsware.com <mm...@commonsware.com> #3
Is this happening with Studio 3.0?
ro...@google.com <ro...@google.com> #4
Note: This worked for me on Windows 7 Pro 32-bit (with Android Studio 2.3.3). Seems like an issue with adt-branding module (which should contain the "/idea/AndroidStudioApplicationInfo.xml" resource).
ro...@google.com <ro...@google.com> #5
Hi, also happened on Mac Book Pro 15 retina mi-2015
MacOs Sierra 10.12.6
Android Studio 2.3.3
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
MacOs Sierra 10.12.6
Android Studio 2.3.3
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
ro...@google.com <ro...@google.com> #6
Thank you for this feedback. Your feedback helps make sure Android development tools are great! Given your issues has been resolved I am closing this issue.
mm...@commonsware.com <mm...@commonsware.com> #7
Romain, this issue is not about Android Studio. This issue is about other development environments, notably CI servers. CI servers do not have Android Studio. Yet, CI servers need to be able to access all repository artifacts that developers might use, including com.android.support.constraint:constraint-layout:1.0.0-alpha2.
ro...@google.com <ro...@google.com> #8
ConstraintLayout has a distributable repository just like support lib does.
It should show up in the SDK manager. How do you get support library from
CI?
It should show up in the SDK manager. How do you get support library from
CI?
mm...@commonsware.com <mm...@commonsware.com> #9
> ConstraintLayout has a distributable repository just like support lib does.
Yes, and the non-Android Studio SDK Manager is only distributing 1.0.0-alpha1, not 1.0.0-alpha2.
> How do you get support library from CI?
That will depend on the CI server. I would assume that few, if any, use the Android Studio SDK Manager, since Android Studio a GUI. Probably some use the command-line arguments for the non-Android Studio SDK Manager, as that's the only official solution that I know of.
Yes, and the non-Android Studio SDK Manager is only distributing 1.0.0-alpha1, not 1.0.0-alpha2.
> How do you get support library from CI?
That will depend on the CI server. I would assume that few, if any, use the Android Studio SDK Manager, since Android Studio a GUI. Probably some use the command-line arguments for the non-Android Studio SDK Manager, as that's the only official solution that I know of.
vs...@google.com <vs...@google.com> #10
Support for distributing an unbundled support library is brand new, so I'm pretty sure we don't support this use case yet from the standalone manager.
ro...@google.com <ro...@google.com> #11
According to Xav, the new Gradle plugin will automatically download the required SDK component. This means all you should need for CI is add constraint-layout as a dependency in your gradle build file.
mm...@commonsware.com <mm...@commonsware.com> #12
Attached, please find three versions of a sample project. Each has:
dependencies {
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2'
}
The differences between the three are the Android Plugin for Gradle versions, in which I used 2.1.2, 2.2.0-alpha1, and 2.2.0-alpha, respectively.
None build from the command line. All three result in:
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom
https://jcenter.bintray.com/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jar
file:/opt/android-sdk-linux/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom
file:/opt/android-sdk-linux/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jar
file:/opt/android-sdk-linux/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom
file:/opt/android-sdk-linux/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jar
Required by:
Button:app:unspecified
This lines up with the behavior seen by those commenting on the Stack Overflow question I cited in the issue.
I do not know what version you are referring to as "the new Gradle plugin", but none of the three that I tried exhibit the behavior that you describe. The feature (auto-download of Android Support Library dependencies) sounds awesome, though.
dependencies {
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha2'
}
The differences between the three are the Android Plugin for Gradle versions, in which I used 2.1.2, 2.2.0-alpha1, and 2.2.0-alpha, respectively.
None build from the command line. All three result in:
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha2.
Searched in the following locations:
file:/opt/android-sdk-linux/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom
file:/opt/android-sdk-linux/extras/android/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jar
file:/opt/android-sdk-linux/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.pom
file:/opt/android-sdk-linux/extras/google/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha2/constraint-layout-1.0.0-alpha2.jar
Required by:
Button:app:unspecified
This lines up with the behavior seen by those commenting on the Stack Overflow question I cited in the issue.
I do not know what version you are referring to as "the new Gradle plugin", but none of the three that I tried exhibit the behavior that you describe. The feature (auto-download of Android Support Library dependencies) sounds awesome, though.
mm...@commonsware.com <mm...@commonsware.com> #13
Sorry, small typo: my third test was 2.2.0-alpha2.
ch...@orr.me.uk <ch...@orr.me.uk> #14
I'm seeing the same problem.
Even if the experimental `android.builder.sdkDownload` flag in the 2.2.0-alpha Gradle plugin (announced at Google I/O) is enabled, the constraint-layout repo is not downloaded ā this option only downloads Builds Tools and the Platform for the `compileSdkVersion` (see issue 36949180 ).
Even if the experimental `android.builder.sdkDownload` flag in the 2.2.0-alpha Gradle plugin (announced at Google I/O) is enabled, the constraint-layout repo is not downloaded ā this option only downloads Builds Tools and the Platform for the `compileSdkVersion` (see
jb...@google.com <jb...@google.com> #15
Since this is now mainly about Gradle downloading components I'm assigning this to Michal.
be...@google.com <be...@google.com> #16
Starting with preview 3, Gradle should automatically download the missing package, assuming $ANDROID_HOME/license has the right files in it.
mm...@commonsware.com <mm...@commonsware.com> #17
What is "preview 3" referring to, exactly?
What is $ANDROID_HOME/license supposed to be?
What is $ANDROID_HOME/license supposed to be?
io...@google.com <io...@google.com> #18
Preview 3 is referring to the alpha3 version of the Gradle plugin. The $ANDROID_HOME/license is a folder in your sdk home directory, for the license agreements that you have previously accepted.
mm...@commonsware.com <mm...@commonsware.com> #19
How does one get an $ANDROID_HOME/license folder on a headless CI server?
be...@google.com <be...@google.com> #20
You need to copy it from a development machine where you have accepted the licenses in the AS UI.
ma...@gmail.com <ma...@gmail.com> #21
This is still the case for AS Preview 3, neither alpha2 nor alpha3 can be found.
I even cloned the constraintlayout codelab repo (https://github.com/googlecodelabs/constraint-layout.git ) to make sure it isn't tied to my project somehow, but still, no luck.
I even cloned the constraintlayout codelab repo (
io...@google.com <io...@google.com> #22
Are you using the Android Gradle Plugin version 2.2.0-alpha3 and
dependencies {
compile 'com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
} ?
dependencies {
compile 'com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha3'
} ?
[Deleted User] <[Deleted User]> #23
We updated to Android Gradle plugin version 2.2.0-alpha3 and the constraint-layout*:1.0.0-alpha3 deps. We're now seeing a different issue on our CI server:
```
File /home/app/.android/repositories.cfg could not be loaded.
Preparing "Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3".
Warning: Failed to read or create install properties file.
Preparing "Install com.android.support.constraint:constraint-layout:1.0.0-alpha3".
Warning: Failed to read or create install properties file.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3.
...
```
Note that "app" is the user running the build on CI.
Runnign `./gradlew clean build` outside Android Studio 2.2 Preview 3 works locally on our dev machine(s) and building inside AS works fine, too.
```
File /home/app/.android/repositories.cfg could not be loaded.
Preparing "Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3".
Warning: Failed to read or create install properties file.
Preparing "Install com.android.support.constraint:constraint-layout:1.0.0-alpha3".
Warning: Failed to read or create install properties file.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3.
...
```
Note that "app" is the user running the build on CI.
Runnign `./gradlew clean build` outside Android Studio 2.2 Preview 3 works locally on our dev machine(s) and building inside AS works fine, too.
xa...@google.com <xa...@google.com> #24
I've just created a new project using plugin 2.2.0-alpha3 and with a dependency on constraint-layout:1.0.0-alpha3 and running './gradlew assDeb' on the command line (on my laptop) I see
File /Users/xav/.android/repositories.cfg could not be loaded.
Preparing "Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3".
"Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3" ready.
Finishing "Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3"
Installing com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3 in /android-sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha3
"Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3" complete.
Preparing "Install com.android.support.constraint:constraint-layout:1.0.0-alpha3".
"Install com.android.support.constraint:constraint-layout:1.0.0-alpha3" ready.
Finishing "Install com.android.support.constraint:constraint-layout:1.0.0-alpha3"
Installing com.android.support.constraint:constraint-layout:1.0.0-alpha3 in /android-sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha3
"Install com.android.support.constraint:constraint-layout:1.0.0-alpha3" complete.
Incremental java compilation is an incubating feature.
So I think the question is whether your SDK is writeable from the job that's running your build on your CI.
File /Users/xav/.android/repositories.cfg could not be loaded.
Preparing "Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3".
"Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3" ready.
Finishing "Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3"
Installing com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3 in /android-sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha3
"Install com.android.support.constraint:constraint-layout-solver:1.0.0-alpha3" complete.
Preparing "Install com.android.support.constraint:constraint-layout:1.0.0-alpha3".
"Install com.android.support.constraint:constraint-layout:1.0.0-alpha3" ready.
Finishing "Install com.android.support.constraint:constraint-layout:1.0.0-alpha3"
Installing com.android.support.constraint:constraint-layout:1.0.0-alpha3 in /android-sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha3
"Install com.android.support.constraint:constraint-layout:1.0.0-alpha3" complete.
Incremental java compilation is an incubating feature.
So I think the question is whether your SDK is writeable from the job that's running your build on your CI.
mm...@commonsware.com <mm...@commonsware.com> #25
The issue of requiring the Android SDK directory to be writeable has come up time and again in this issue tracker, previously in the context of Android Studio being unhappy with a read-only SDK directory.
(Android Studio 2.1.2 still is unhappy, but it is at least less neurotic about it)
Is there a plan to document a recipe by which those of us who use read-only SDK directories can do a controlled update of the SDK components, rather than having to keep a writeable SDK directory? Today, sudo tools/android works quite nicely, as it has largely since Android's inception.
(Android Studio 2.1.2 still is unhappy, but it is at least less neurotic about it)
Is there a plan to document a recipe by which those of us who use read-only SDK directories can do a controlled update of the SDK components, rather than having to keep a writeable SDK directory? Today, sudo tools/android works quite nicely, as it has largely since Android's inception.
xa...@google.com <xa...@google.com> #26
If you want to automatically download stuff on demand, then you need to be writeable. Similarly, your .gradle and .m2 folders are writeable.
Now I understand wanting to control who can write in there. I could see for example, not wanting to have an app build process be able to write in there in case you use some 3rd party plugins. For this we do want to also have a command line version that's separate from gradle that will allow you to download stuff. The question is how you'll inject what needs to be downloaded from the list of dependencies in your gradle build.
Now I understand wanting to control who can write in there. I could see for example, not wanting to have an app build process be able to write in there in case you use some 3rd party plugins. For this we do want to also have a command line version that's separate from gradle that will allow you to download stuff. The question is how you'll inject what needs to be downloaded from the list of dependencies in your gradle build.
mm...@commonsware.com <mm...@commonsware.com> #27
> If you want to automatically download stuff on demand, then you need to be writeable
I know others have asked for that. IMHO, downloading SDK components on demand needs to be optional, just as using the Gradle Wrapper is optional. Security conscious developers won't do either of those things.
> Similarly, your .gradle and .m2 folders are writeable.
Those are always either per-project or per-user, whereas the SDK might be per-machine. That's important in shared environments (training labs, CI servers, etc.) where they want a common SDK installation.
> The question is how you'll inject what needs to be downloaded from the list of dependencies in your gradle build.
The command-line tool could be Gradle, just with a purpose-built build.gradle file, instead of a standard project one. Or, perhaps it could be a standard project build.gradle file, but with a specific task for the intention of downloading SDK components (e.g., sudo gradle installSdkComponents). IMHO, we don't necessarily need a separate *tool*, just a way of saying "yes, it is OK for you to download components now".
I know others have asked for that. IMHO, downloading SDK components on demand needs to be optional, just as using the Gradle Wrapper is optional. Security conscious developers won't do either of those things.
> Similarly, your .gradle and .m2 folders are writeable.
Those are always either per-project or per-user, whereas the SDK might be per-machine. That's important in shared environments (training labs, CI servers, etc.) where they want a common SDK installation.
> The question is how you'll inject what needs to be downloaded from the list of dependencies in your gradle build.
The command-line tool could be Gradle, just with a purpose-built build.gradle file, instead of a standard project one. Or, perhaps it could be a standard project build.gradle file, but with a specific task for the intention of downloading SDK components (e.g., sudo gradle installSdkComponents). IMHO, we don't necessarily need a separate *tool*, just a way of saying "yes, it is OK for you to download components now".
[Deleted User] <[Deleted User]> #28
@xav, that was it (barring any unforseen errors), thanks a bunch! I know this is alpha-level but really appreciate everyone giving this a look and offering suggestions/fixes. :fistbump:
be...@google.com <be...@google.com> #29
You can disable the "auto-download" feature by running gradle with "--offline" or "-Pandroid.builder.sdkDownload=false"
kn...@gmail.com <kn...@gmail.com> #30
I had this issue on my development machine (with alpha4).
Using
classpath 'com.android.tools.build:gradle:2.2.0-alpha7'
And dependencies:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
compile 'com.android.support.constraint:constraint-layout-solver:1.0.0-alpha4'
I use primarily the external (non-AS) package manager. As you can see from my attachment. There is no row for constraint layout.
However, after reading this bug report, I checked the internal (AS) package manager. You can clearly see that there are two new packages that would resolve my issue.
Using
classpath 'com.android.tools.build:gradle:2.2.0-alpha7'
And dependencies:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha4'
compile 'com.android.support.constraint:constraint-layout-solver:1.0.0-alpha4'
I use primarily the external (non-AS) package manager. As you can see from my attachment. There is no row for constraint layout.
However, after reading this bug report, I checked the internal (AS) package manager. You can clearly see that there are two new packages that would resolve my issue.
al...@gmail.com <al...@gmail.com> #31
how to fix that on CI machine?
io...@google.com <io...@google.com> #32
The latest version of the constraint-layout is alpha5, that is the version you see in the Sdk Manager. The auto-download feature works as with the same packages that you can see from the Sdk Manager in Studio.
In other words, alpha4 is no longer available to download.
In other words, alpha4 is no longer available to download.
kn...@gmail.com <kn...@gmail.com> #33
OK, thank you for the information - I changed to use alpha5. It had the same issue initially. Nothing was immediately downloaded, instead showing me the error in Android Studio indicating that the dependency couldn't be resolved.
However, this time when I clicked on the "install" hyperlink from the error in Android Studio it managed to find and install it. Previously it showed an error.
Using alpha5 was certainly helpful to get the situation resolved.
Where can I keep tabs on the current version of constraint layout? The tools blog latest comment on it was "New constraint layout library version alpha4.".
However, this time when I clicked on the "install" hyperlink from the error in Android Studio it managed to find and install it. Previously it showed an error.
Using alpha5 was certainly helpful to get the situation resolved.
Where can I keep tabs on the current version of constraint layout? The tools blog latest comment on it was "New constraint layout library version alpha4.".
io...@google.com <io...@google.com> #34
The auto-download feature works only from the command line, therefore if you tried building from Studio that still wouldn't have worked. The blog is probably still the best way to keep track of things, I will file a bug to add this to the release notes.
al...@gmail.com <al...@gmail.com> #35
How to install it on CI machine?
I have installed: 143- Android Support Repository, revision 35
But build process finished with the message:
"You have not accepted the license agreements of the following SDK components:
[Solver for ConstraintLayout 1.0.0-alpha5, ConstraintLayout for Android 1.0.0-alpha5]."
I have installed: 143- Android Support Repository, revision 35
But build process finished with the message:
"You have not accepted the license agreements of the following SDK components:
[Solver for ConstraintLayout 1.0.0-alpha5, ConstraintLayout for Android 1.0.0-alpha5]."
be...@google.com <be...@google.com> #36
The same error message contains a link to http://d.android.com/r/studio-ui/export-licenses.html which should explain what the problem is.
jb...@google.com <jb...@google.com> #37
Please note that the new package type used by constraint layout is not supported by the command-line or standalone sdk managers. We hope to provide a new command-line sdk manager at some point in the future.
[Deleted User] <[Deleted User]> #38
Downloading ConstraintLayout when building from command line now seems to work. It also works when opening the SDK Manager from Android Studio and downloading it manually. The only scenario which doesn't work is when building from within Android Studio without manually downloading it first which I find highly confusing. I think the `android.builder.sdkDownload` flag should work in Android Studio, too.
[Deleted User] <[Deleted User]> #39
[Comment deleted]
ry...@gmail.com <ry...@gmail.com> #40
We are also having this issue. Can't get it to build on our CI server because we can't download it. Fix this plz?
at...@gmail.com <at...@gmail.com> #41
Same issue on our CI machine with alpha9
running:
gradlew --refresh-dependencies
on the CI machine would just throw the same errors like #12
running:
gradlew --refresh-dependencies
on the CI machine would just throw the same errors like #12
wo...@gmail.com <wo...@gmail.com> #42
Testing on Android is such a pain. Its just not possible to CI now.
be...@google.com <be...@google.com> #43
@athkast - can you please file a new bug, with exact repro steps? I can see gradle automatically downloading the constraint-layout package when running from the command line.
yi...@gmail.com <yi...@gmail.com> #44
Running:
./gradlew dependencies
This worked yesterday. I ran the same build again today (the same exact git commit hash for my project), and it failed with:
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9]
Please install the missing components using the SDK manager in Android Studio.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
./gradlew dependencies
This worked yesterday. I ran the same build again today (the same exact git commit hash for my project), and it failed with:
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9]
Please install the missing components using the SDK manager in Android Studio.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
yi...@gmail.com <yi...@gmail.com> #45
I created an empty sample project and added the ConstraintLayout gradle dependency. It's attached. When running ./gradlew dependencies on this project with an SDK that doesn't have ConstraintLayout installed, it has the failure mentioned above.
be...@google.com <be...@google.com> #46
I can't reproduce this, your project works fine for me. Can you try running with --stacktrace and --info and pasting the output when it fails? Is your SDK directory writeable? Symlinked? On NFS?
yi...@gmail.com <yi...@gmail.com> #47
Output attached.
SDK directory is writeable. Default install on macOS.
It appears that running the command again succeeds. The file copy completed during the failure, then the 2nd run accepted the existing repository files.
SDK directory is writeable. Default install on macOS.
It appears that running the command again succeeds. The file copy completed during the failure, then the 2nd run accepted the existing repository files.
jy...@gmail.com <jy...@gmail.com> #48
#46
You can easily reproduce it on CI. (Travis, CIrcleCI, etc..)
Here is my circle.yml:
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter "android-24"
- echo y | android update sdk --no-ui --all --filter "build-tools-24.0.3"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
Note that it requests required components via legacy SDK manager.
And my gradle.properties in root folder:
android.builder.sdkDownload=true
In my dependency includes:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
With all of these, building on CircleCI gives the following error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':mobile'.
> You have not accepted the license agreements of the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go tohttp://d.android.com/r/studio-ui/export-licenses.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
You can easily reproduce it on CI. (Travis, CIrcleCI, etc..)
Here is my circle.yml:
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter "android-24"
- echo y | android update sdk --no-ui --all --filter "build-tools-24.0.3"
- echo y | android update sdk --no-ui --all --filter "extra-android-m2repository"
- echo y | android update sdk --no-ui --all --filter "extra-google-m2repository"
Note that it requests required components via legacy SDK manager.
And my gradle.properties in root folder:
android.builder.sdkDownload=true
In my dependency includes:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha9'
With all of these, building on CircleCI gives the following error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':mobile'.
> You have not accepted the license agreements of the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
yi...@gmail.com <yi...@gmail.com> #49
That's actually a different error. The command prompt sdk manager cannot accept the license (that I know of). To solve that, you can copy your $ANDROID_HOME/licenses/ files into CircleCI (I use an env variable then echo that to a file). See https://developer.android.com/studio/intro/update.html#download-with-gradle
jy...@gmail.com <jy...@gmail.com> #50
#50 Finally I got the same issue of above after copying the licenses into CI project.
What I got now:
Preparing "Install Solver for ConstraintLayout 1.0.0-alpha9".
"Install Solver for ConstraintLayout 1.0.0-alpha9" ready.
Finishing "Install Solver for ConstraintLayout 1.0.0-alpha9"
Installing Solver for ConstraintLayout 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9
"Install Solver for ConstraintLayout 1.0.0-alpha9" failed.
Preparing "Install ConstraintLayout for Android 1.0.0-alpha9".
"Install ConstraintLayout for Android 1.0.0-alpha9" ready.
Finishing "Install ConstraintLayout for Android 1.0.0-alpha9"
Installing ConstraintLayout for Android 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9
"Install ConstraintLayout for Android 1.0.0-alpha9" failed.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':mobile'.
> Failed to install the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9]
Please install the missing components using the SDK manager in Android Studio.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
It seems to constraintlayout depends on extras m2repository, but there is no way to install it from the command line. (like android support and google m2repostory)
What I got now:
Preparing "Install Solver for ConstraintLayout 1.0.0-alpha9".
"Install Solver for ConstraintLayout 1.0.0-alpha9" ready.
Finishing "Install Solver for ConstraintLayout 1.0.0-alpha9"
Installing Solver for ConstraintLayout 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9
"Install Solver for ConstraintLayout 1.0.0-alpha9" failed.
Preparing "Install ConstraintLayout for Android 1.0.0-alpha9".
"Install ConstraintLayout for Android 1.0.0-alpha9" ready.
Finishing "Install ConstraintLayout for Android 1.0.0-alpha9"
Installing ConstraintLayout for Android 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9
"Install ConstraintLayout for Android 1.0.0-alpha9" failed.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':mobile'.
> Failed to install the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9]
Please install the missing components using the SDK manager in Android Studio.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
It seems to constraintlayout depends on extras m2repository, but there is no way to install it from the command line. (like android support and google m2repostory)
be...@google.com <be...@google.com> #51
This seems to be an issue with the underlying SDK manager code. We'll add more logging in 2.3 previews so we can try to understand what's going on, as I cannot reproduce the problem.
yi...@gmail.com <yi...@gmail.com> #52
Thanks for being on top of it. If I can provide more information when the 2.3 previews come out, please let me know.
ol...@gmail.com <ol...@gmail.com> #53
I had the same problem but did not notice this ticket at time.
Even if the installation fails, it seems possible to assemble the apk anyway afterwards. Not a solution since the CI build fails because of the failing status.
I included a stacktrace also.
https://code.google.com/p/android/issues/detail?id=224845
Even if the installation fails, it seems possible to assemble the apk anyway afterwards. Not a solution since the CI build fails because of the failing status.
I included a stacktrace also.
ol...@gmail.com <ol...@gmail.com> #55
@Googlers> You can access CircleCI via ssh if that would help the debugging.
be...@google.com <be...@google.com> #56
One more question: are you using https://github.com/JakeWharton/sdk-manager-plugin ? If so, can you reproduce the problem without it?
[Deleted User] <[Deleted User]> #57
FWIW, once we solved the license/writeable directory issue we've been building on CI (Jenkins that runs a docker instance) without any problems.
I'll attach the Dockerfile if that helps anyone.
Our gradle build is pretty basic, but if you want to look let me know.
I'll attach the Dockerfile if that helps anyone.
Our gradle build is pretty basic, but if you want to look let me know.
ka...@droidsonroids.pl <ka...@droidsonroids.pl> #58
@bendowski@google.com I've noticed the same issue. I'm not using sdk-manager-plugin.
Results are the same as described in #54 - first attempt downloads file successfully but reports failure. Second attempt on the same host succeeds without downloading (constraint layout is already installed).
Taking #58 into account it seems that issue may be related with file permissions (indeed I haven't noticed such issue on another machine).
Maybe SDK manager could not perform some action due to missing permission and reports failure but on second attempt it is irrelevant.
Results are the same as described in #54 - first attempt downloads file successfully but reports failure. Second attempt on the same host succeeds without downloading (constraint layout is already installed).
Taking #58 into account it seems that issue may be related with file permissions (indeed I haven't noticed such issue on another machine).
Maybe SDK manager could not perform some action due to missing permission and reports failure but on second attempt it is irrelevant.
yi...@gmail.com <yi...@gmail.com> #59
#57 Not using the Jake Wharton plugin. The test project didn't either. It failed both on CircleCI and macOS for me. To recreate it, I do still need to clear the local gradle repo folder:
rm -r ~/Library/Android/sdk/extras/m2repository/com/
I also definitely have writeable permissions :)
rm -r ~/Library/Android/sdk/extras/m2repository/com/
I also definitely have writeable permissions :)
th...@gmail.com <th...@gmail.com> #60
I ran into this problem yesterday, and tried everything I could think of to resolve it. I am using Circle CI, and thought I could embed my licences/ into the app repository and copy them out to the Circle CI server before a build. This definitely removed the error related to not having accepted the licenses, but replaced the problem with errors related to not succeeding downloading the constraint layout packages, as mentioned in #51.
My circle.yml file is:
general:
artifacts:
- /home/ubuntu/MYPROJECT/app/build/outputs/apk/
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,extra-android-m2repository,extra-google-m2repository,extra-google-google_play_services,extra-android-support,android-24
- echo y | android update sdk --no-ui --all --filter build-tools-24.0.3
- mkdir -p /usr/local/android-sdk-linux/licenses
- mkdir -p /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9
- mkdir -p /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9
- cp /home/ubuntu/MYPROJECT/licenses/* /usr/local/android-sdk-linux/licenses/
cache_directories:
- /usr/local/android-sdk-linux
test:
override:
- ./gradlew assemble
- cp -r app/build/outputs $CIRCLE_ARTIFACTS
The lines where I'm trying to mkdir the directories ahead of installation were not actually successful. They had no discernible effect on the outcome.
When Circle CI performs the ./gradlew dependencies, the errors are:
File /home/ubuntu/.android/repositories.cfg could not be loaded.
Preparing "Install Solver for ConstraintLayout 1.0.0-alpha9".
"Install Solver for ConstraintLayout 1.0.0-alpha9" ready.
Finishing "Install Solver for ConstraintLayout 1.0.0-alpha9"
Installing Solver for ConstraintLayout 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9
"Install Solver for ConstraintLayout 1.0.0-alpha9" failed.
Preparing "Install ConstraintLayout for Android 1.0.0-alpha9".
"Install ConstraintLayout for Android 1.0.0-alpha9" ready.
Finishing "Install ConstraintLayout for Android 1.0.0-alpha9"
Installing ConstraintLayout for Android 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9
"Install ConstraintLayout for Android 1.0.0-alpha9" failed.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':mobile'.
> Failed to install the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9]
Please install the missing components using the SDK manager in Android Studio.
Using Gradle plugin 2.2.1 and build tools 24.0.3. No sdk-manager plugin present.
My circle.yml file is:
general:
artifacts:
- /home/ubuntu/MYPROJECT/app/build/outputs/apk/
machine:
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
dependencies:
pre:
- echo y | android update sdk --no-ui --all --filter tools,platform-tools,extra-android-m2repository,extra-google-m2repository,extra-google-google_play_services,extra-android-support,android-24
- echo y | android update sdk --no-ui --all --filter build-tools-24.0.3
- mkdir -p /usr/local/android-sdk-linux/licenses
- mkdir -p /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9
- mkdir -p /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9
- cp /home/ubuntu/MYPROJECT/licenses/* /usr/local/android-sdk-linux/licenses/
cache_directories:
- /usr/local/android-sdk-linux
test:
override:
- ./gradlew assemble
- cp -r app/build/outputs $CIRCLE_ARTIFACTS
The lines where I'm trying to mkdir the directories ahead of installation were not actually successful. They had no discernible effect on the outcome.
When Circle CI performs the ./gradlew dependencies, the errors are:
File /home/ubuntu/.android/repositories.cfg could not be loaded.
Preparing "Install Solver for ConstraintLayout 1.0.0-alpha9".
"Install Solver for ConstraintLayout 1.0.0-alpha9" ready.
Finishing "Install Solver for ConstraintLayout 1.0.0-alpha9"
Installing Solver for ConstraintLayout 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-alpha9
"Install Solver for ConstraintLayout 1.0.0-alpha9" failed.
Preparing "Install ConstraintLayout for Android 1.0.0-alpha9".
"Install ConstraintLayout for Android 1.0.0-alpha9" ready.
Finishing "Install ConstraintLayout for Android 1.0.0-alpha9"
Installing ConstraintLayout for Android 1.0.0-alpha9 in /usr/local/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-alpha9
"Install ConstraintLayout for Android 1.0.0-alpha9" failed.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':mobile'.
> Failed to install the following SDK components:
[ConstraintLayout for Android 1.0.0-alpha9, Solver for ConstraintLayout 1.0.0-alpha9]
Please install the missing components using the SDK manager in Android Studio.
Using Gradle plugin 2.2.1 and build tools 24.0.3. No sdk-manager plugin present.
jo...@gmail.com <jo...@gmail.com> #61
#61 Assuming the download really succeeds but gradle fails to resolve the dependency on the updated m2repository until the next gradle invocation (see #54), a workaround for CircleCI is to override the gradle dependencies with a similar command that ignores the return status:
dependencies:
override:
gradle dependencies || true
This will allow the subsequent gradle assemble to succeed.
You can see that trick in action athttps://circleci.com/gh/libpd/pd-for-android/88
dependencies:
override:
gradle dependencies || true
This will allow the subsequent gradle assemble to succeed.
You can see that trick in action at
th...@gmail.com <th...@gmail.com> #62
Thanks #62: That definitely gets me much further.
[Deleted User] <[Deleted User]> #63
What about TravisCI? With latest update the Alpha1 was removed and build fails.
Any workaround?
Thanks.
Any workaround?
Thanks.
ad...@gmail.com <ad...@gmail.com> #65
Hey there,
We're using Jenkins and also came across this issue.
Looking forward for the fix.
V
We're using Jenkins and also came across this issue.
Looking forward for the fix.
V
[Deleted User] <[Deleted User]> #66
I'm also using Jenkins and looking forward for the fix.
al...@gmail.com <al...@gmail.com> #67
[Comment deleted]
co...@gmail.com <co...@gmail.com> #68
Not fixed for me on Travis
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta1, ConstraintLayout for Android 1.0.0-beta1].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta1, ConstraintLayout for Android 1.0.0-beta1].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
yi...@gmail.com <yi...@gmail.com> #69
#71, the accepting of the license agreement is separate. Please see #50 (or other previous comments) on how to solve that error.
be...@google.com <be...@google.com> #70
Should be fixed in 2.3
Change-Id: If5406098aa4a7bd2912311e5cdfe591c599624f8
Change-Id: If5406098aa4a7bd2912311e5cdfe591c599624f8
bl...@gmail.com <bl...@gmail.com> #71
mc...@gmail.com <mc...@gmail.com> #72
For all users of Jenkins/Travis/CircleCI or any other CI server:
You can generate the 'licenses' directory on every build by adding these lines to your build file, before your actual ./gradlew line:
echo $ANDROID_HOME
mkdir $ANDROID_HOME/licenses
echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > $ANDROID_HOME/licenses/android-sdk-license
echo 84831b9409646a918e30573bab4c9c91346d8abd > $ANDROID_HOME/licenses/android-sdk-preview-license
The values should correspond to the file contents you can find on your local machine in $ANDROID_HOME/licenses
Happy building! :)
You can generate the 'licenses' directory on every build by adding these lines to your build file, before your actual ./gradlew line:
echo $ANDROID_HOME
mkdir $ANDROID_HOME/licenses
echo 8933bad161af4178b1185d1a37fbf41ea5269c55 > $ANDROID_HOME/licenses/android-sdk-license
echo 84831b9409646a918e30573bab4c9c91346d8abd > $ANDROID_HOME/licenses/android-sdk-preview-license
The values should correspond to the file contents you can find on your local machine in $ANDROID_HOME/licenses
Happy building! :)
ja...@google.com <ja...@google.com> #73
Fix will also be available in 2.2.3.
Change-Id: I587064bc080cab89de82b08a98459c20051af965
Change-Id: I587064bc080cab89de82b08a98459c20051af965
ub...@gmail.com <ub...@gmail.com> #74
Regarding the missing component (not the license!) issue executing
./gradlew dependencies --console=plain || true
before actually building proved to be a suitable temporary workaround on our CI. Found this somewhere on the net, but couldn't find the source anymore.
./gradlew dependencies --console=plain || true
before actually building proved to be a suitable temporary workaround on our CI. Found this somewhere on the net, but couldn't find the source anymore.
fo...@gmail.com <fo...@gmail.com> #76
Was this really fixed in 2.2.3? I'm still observing the problem using gradle:2.3.0-alpha1
al...@gmail.com <al...@gmail.com> #77
Just use this trick: http://stackoverflow.com/a/40144426/4548500 . Worked fine for me and it only requires adding two lines to your .travis.yml.
ah...@gmail.com <ah...@gmail.com> #78
I've been suffering for nearly a week with this issue and now it is solved by doing these steps (Using Jenkins CI)
1- You need to resolve the license issue by issuing these commands.
mkdir "${ANDROID_HOME}/licenses" || true && \
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" \
> "${ANDROID_HOME}/licenses/android-sdk-license" && \
echo -e "\nd23d63a1f23e25e2c7a316e29eb60396e7924281" \
> "${ANDROID_HOME}/licenses/android-sdk-preview-license"
2- After that you need to make sure that $ANDROID_HOME is writable or at least the $ANDROID_HOME/extras because that is where the constraintlayout dependency is written there.
3- After doing step 1 and 2, you will issue a build but it will still for some reason fail(bug?) even though the constraintlayout dependency is installed, proceed with your ./gradlew build command, you will find that the build goes through and the build succeeds.
./gradlew dependencies || true && ./gradlew assembleDevDebug
Hopefully that would help someone.
1- You need to resolve the license issue by issuing these commands.
mkdir "${ANDROID_HOME}/licenses" || true && \
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" \
> "${ANDROID_HOME}/licenses/android-sdk-license" && \
echo -e "\nd23d63a1f23e25e2c7a316e29eb60396e7924281" \
> "${ANDROID_HOME}/licenses/android-sdk-preview-license"
2- After that you need to make sure that $ANDROID_HOME is writable or at least the $ANDROID_HOME/extras because that is where the constraintlayout dependency is written there.
3- After doing step 1 and 2, you will issue a build but it will still for some reason fail(bug?) even though the constraintlayout dependency is installed, proceed with your ./gradlew build command, you will find that the build goes through and the build succeeds.
./gradlew dependencies || true && ./gradlew assembleDevDebug
Hopefully that would help someone.
[Deleted User] <[Deleted User]> #79
When will `--accept-licenses` flag be made available in sdk update tools? We don't want to hack around and place "\n8933bad161af4178b1185d1a37fbf41ea5269c55" into our shell scripts.
mr...@gmail.com <mr...@gmail.com> #80
Unfortunately the auto-dowloading does not work in certain proxy scenarios making this quite hard to deal with: https://code.google.com/p/android/issues/detail?id=229061
no...@gmail.com <no...@gmail.com> #81
I can still reproduce this in 2.2.3. However, I cannot repro in 2.3.0-alpha3
an...@gmail.com <an...@gmail.com> #82
Agree with #85, problem still persists in 2.2.3 but fixed in 2.3.0-alpha3. According to #76 it was fixed in 2.2.3, but apparently it isn't. Any followup on it?
be...@google.com <be...@google.com> #83
Can you please specify what exactly you can reproduce in 2.2.3? With/without Travis?
yi...@gmail.com <yi...@gmail.com> #84
Attached output using android gradle plugin 2.2.3. "./gradlew dependencies"
Same failure as before. Running ./gradlew dependencies twice as the workaround still works.
Same failure as before. Running ./gradlew dependencies twice as the workaround still works.
no...@gmail.com <no...@gmail.com> #85
I've used both Docker and Travis-CI for my CI builds. This is my Docker setup: https://github.com/noelmansour/docker-android-project/ . Here is my Travis-CI configuration: https://travis-ci.org/snowble/vertical-stepper/jobs/184385227/config
On Docker running 2.3.3, I've needed to run a gradle task twice. The first will fail and the second will pass (as mentioned in previous comments). This is not needed when running 2.3.0-alpha3.
Interestingly, this workaround is not needed for Travis-CI running 2.3.3.
Hope that helps.
On Docker running 2.3.3, I've needed to run a gradle task twice. The first will fail and the second will pass (as mentioned in previous comments). This is not needed when running 2.3.0-alpha3.
Interestingly, this workaround is not needed for Travis-CI running 2.3.3.
Hope that helps.
jo...@gmail.com <jo...@gmail.com> #86
@89 the number of times the command needs to be retried can depend on if/when the download is cached by the CI framework.
no...@gmail.com <no...@gmail.com> #87
@90 I was using bitbucket's pipeline for CI which kills the Docker process on completion. Seeing the bug can be reproduced locally quite easily.
I would think that the bug fix should work on any image, whether fresh or already running, with cached files.
I would think that the bug fix should work on any image, whether fresh or already running, with cached files.
an...@brightinventions.pl <an...@brightinventions.pl> #88
I'm having the same issue building with Docker and constraint-layout:1.0.0-beta4.
Checking the license for package Solver for ConstraintLayout 1.0.0-beta4 in /opt/android-sdk-linux/licenses
License for package Solver for ConstraintLayout 1.0.0-beta4 accepted.
Preparing "Install Solver for ConstraintLayout 1.0.0-beta4".
"Install Solver for ConstraintLayout 1.0.0-beta4" ready.
Finishing "Install Solver for ConstraintLayout 1.0.0-beta4"
Installing Solver for ConstraintLayout 1.0.0-beta4 in /opt/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta4
"Install Solver for ConstraintLayout 1.0.0-beta4" failed.
Checking the license for package ConstraintLayout for Android 1.0.0-beta4 in /opt/android-sdk-linux/licenses
License for package ConstraintLayout for Android 1.0.0-beta4 accepted.
Preparing "Install ConstraintLayout for Android 1.0.0-beta4".
"Install ConstraintLayout for Android 1.0.0-beta4" ready.
Finishing "Install ConstraintLayout for Android 1.0.0-beta4"
Installing ConstraintLayout for Android 1.0.0-beta4 in /opt/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta4
"Install ConstraintLayout for Android 1.0.0-beta4" failed.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta4, ConstraintLayout for Android 1.0.0-beta4]
Please install the missing components using the SDK manager in Android Studio.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I can see both constraint-layout and constraint-layout-solver downloaded in the "extras" directory ($ANDROID_HOME/extras/m2repository/com/android/support/constraint).
When I run the gradle task twice as a workaround (e.g. gradle dependencies || true && gradle assembleRelease) it works.
You can find my Dockerfile attached.
Checking the license for package Solver for ConstraintLayout 1.0.0-beta4 in /opt/android-sdk-linux/licenses
License for package Solver for ConstraintLayout 1.0.0-beta4 accepted.
Preparing "Install Solver for ConstraintLayout 1.0.0-beta4".
"Install Solver for ConstraintLayout 1.0.0-beta4" ready.
Finishing "Install Solver for ConstraintLayout 1.0.0-beta4"
Installing Solver for ConstraintLayout 1.0.0-beta4 in /opt/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta4
"Install Solver for ConstraintLayout 1.0.0-beta4" failed.
Checking the license for package ConstraintLayout for Android 1.0.0-beta4 in /opt/android-sdk-linux/licenses
License for package ConstraintLayout for Android 1.0.0-beta4 accepted.
Preparing "Install ConstraintLayout for Android 1.0.0-beta4".
"Install ConstraintLayout for Android 1.0.0-beta4" ready.
Finishing "Install ConstraintLayout for Android 1.0.0-beta4"
Installing ConstraintLayout for Android 1.0.0-beta4 in /opt/android-sdk-linux/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta4
"Install ConstraintLayout for Android 1.0.0-beta4" failed.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Failed to install the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta4, ConstraintLayout for Android 1.0.0-beta4]
Please install the missing components using the SDK manager in Android Studio.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
I can see both constraint-layout and constraint-layout-solver downloaded in the "extras" directory ($ANDROID_HOME/extras/m2repository/com/android/support/constraint).
When I run the gradle task twice as a workaround (e.g. gradle dependencies || true && gradle assembleRelease) it works.
You can find my Dockerfile attached.
be...@google.com <be...@google.com> #89
Can you please file another bug for this? In this case the SDK-handling code thinks it failed to install the package, this may have something to do with running inside Docker.
It would be helpful to run the build with --info to see what went wrong.
It would be helpful to run the build with --info to see what went wrong.
br...@gmail.com <br...@gmail.com> #90
I'm having the same issue with the following log:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_prodDebugApk'.
> A problem occurred configuring project ':form'.
> Failed to install the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta4, ConstraintLayout for Android 1.0.0-beta4]
Please install the missing components using the SDK manager in Android Studio.
I attached a verbose version of the log containing the part causing the exception.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_prodDebugApk'.
> A problem occurred configuring project ':form'.
> Failed to install the following SDK components:
[Solver for ConstraintLayout 1.0.0-beta4, ConstraintLayout for Android 1.0.0-beta4]
Please install the missing components using the SDK manager in Android Studio.
I attached a verbose version of the log containing the part causing the exception.
be...@google.com <be...@google.com> #91
Joe - can you please have a look at the log? Any idea what's the
jb...@google.com <jb...@google.com> #92
It's not obvious to me. My guess is that we install the package correctly, but then are failing to update maven-metadata.xml, though I'm not sure why there aren't any relevant errors in the log.
Could someone experiencing the issue please attach their
extras/m2repository/com/android/support/constraint/constraint-layout/maven-metadata.xml
and
extras/m2repository/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml?
Could someone experiencing the issue please attach their
extras/m2repository/com/android/support/constraint/constraint-layout/maven-metadata.xml
and
extras/m2repository/com/android/support/constraint/constraint-layout-solver/maven-metadata.xml?
no...@gmail.com <no...@gmail.com> #93
There is no maven-metadata.xml file for both the constraint-layout and constraint-layout-solver directories. This is after running the gradle commands twice.
[Deleted User] <[Deleted User]> #94
i have the same error with constraint-layout-1.0.0-beta4 and shippable CI , is there any working solution ? could anyone please check my log ?
da...@gmail.com <da...@gmail.com> #95
One more here with the same issue using constraint-layout-1.0.0-beta4, would beta3 be a workaround?
[Deleted User] <[Deleted User]> #96
neither version of beta3 and beta4 not working . in shippable if any error in build occurs the the shippable will kill the process of docker , so this command :
./gradlew dependencies || true && ./gradlew assemblDebug
is not a workaround solution for me .
./gradlew dependencies || true && ./gradlew assemblDebug
is not a workaround solution for me .
ja...@gmail.com <ja...@gmail.com> #97
@100 Why not try to use the gradle "--continue" parameter. Like this: ./gradlew dependencies assembleDebug --continue.
[Deleted User] <[Deleted User]> #98
@101 even with --continue , process is failing still .
du...@gmail.com <du...@gmail.com> #99
fwiw, it seems to me you can work around this by just including the libraries in your project. It's ugly, but they're only 150K or so and it seems to work.
In particular, what I did was:
1.) used Android Studio to create an sdk directory that includes ConstraintLayout (I don't know a way to use the command-line 'android' update tool to fetch the library.
2.) make a library directory in your project (I called mine 'libs')
3.) From the sdk dir inside which Android Studio created, look for:
extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta4
4.) from that dir, copy constraint-layout-1.0.0-beta4.aar to your project's 'libs' dir
5.) from the same sdk dir, copy extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta4/constraint-layout-solver-1.0.0-beta4.jar to the libs dir also
6.) Add those files as dependencies in your build.gradle. My modifications were:
repositories
{
flatDir
{
dirs '../libs'
}
}
dependencies
{
compile( name:'constraint-layout-1.0.0-beta4', ext:'aar' )
compile( name:'constraint-layout-solver-1.0.0-beta4', ext:'jar' )
}
After that, things worked. The release page says beta5 is out (I haven't tried that) and that it's the last release before 1.0 and is itself an RC. I'm hopeful this will be fixed by 1.0 and the libraries can be removed from my project then. :)
I'm using:
classpath 'com.android.tools.build:gradle:2.3.0-beta4'
and distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
in my gradle-wrapper.properties. No idea whether those last two things matter, though.
In particular, what I did was:
1.) used Android Studio to create an sdk directory that includes ConstraintLayout (I don't know a way to use the command-line 'android' update tool to fetch the library.
2.) make a library directory in your project (I called mine 'libs')
3.) From the sdk dir inside which Android Studio created, look for:
extras/m2repository/com/android/support/constraint/constraint-layout/1.0.0-beta4
4.) from that dir, copy constraint-layout-1.0.0-beta4.aar to your project's 'libs' dir
5.) from the same sdk dir, copy extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.0-beta4/constraint-layout-solver-1.0.0-beta4.jar to the libs dir also
6.) Add those files as dependencies in your build.gradle. My modifications were:
repositories
{
flatDir
{
dirs '../libs'
}
}
dependencies
{
compile( name:'constraint-layout-1.0.0-beta4', ext:'aar' )
compile( name:'constraint-layout-solver-1.0.0-beta4', ext:'jar' )
}
After that, things worked. The release page says beta5 is out (I haven't tried that) and that it's the last release before 1.0 and is itself an RC. I'm hopeful this will be fixed by 1.0 and the libraries can be removed from my project then. :)
I'm using:
classpath 'com.android.tools.build:gradle:2.3.0-beta4'
and distributionUrl=https\://
in my gradle-wrapper.properties. No idea whether those last two things matter, though.
br...@gmail.com <br...@gmail.com> #100
If you are getting "Please install the missing components using the SDK manager in Android Studio." error you can just install the missing component with the sdkmanager command line tool:
echo y | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4"
echo y | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta"
echo y | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.0-beta4"
echo y | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.0-beta"
br...@gmail.com <br...@gmail.com> #101
[Comment deleted]
[Deleted User] <[Deleted User]> #102
ga...@gmail.com <ga...@gmail.com> #103
The sdkmanager doesn't work for automated continuous integration systems, because it doesn't have an auto accept license... Does sound similar, lol.
yi...@gmail.com <yi...@gmail.com> #104
This succeeded when using newly released android plugin 2.3.0.
jb...@google.com <jb...@google.com> #105
It sounds to me like this is resolved. If you see the issue again, please open a new bug.
Description
See
I realize that this is an alpha, but some developers use CI servers routinely, even for experiments, and so ideally all dependencies can be resolved by such servers.
Thanks!