-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gradle build task use outdated libraries, unable to upgrade directly #2986
Comments
More information: Error message on issue #1: Error message on issue #2: |
@gedeh: We normally see the "Not accepted license agreement" error when the required Android SDK or build tools or SDK components are not already installed on the hosted build VMs. Updating the SDK has helped resolve the issue for other customers. Which version of Android SDK are you using? Do you still need the workaround? Thanks, |
Hi @madhurig, thanks for your reply. Yes when this issue is raised the SDK components are not yet updated in hosted build VM as mentioned in my issue above. I am always try to use latest SDK and tools on my project. The main idea of the issue was if customer needs newer SDK than what installed in hosted build machine, the build should able to update to requested version seamlessly without have to use mentioned workaround, if possible. I will try to modify my build to skip the workaround and believe it will work if hosted agent has the version. But I think will fail again once I update the components. Thanks |
@gedeh: The issue with automatically updating the requested version is the license agreement. We need a way for the user to agree to installing new components on the VM during their build. The amount of time it takes to download the component would also be a concern on hosted build. It will be a good enhancement. |
@madhurig yes I agree if it should be classified as enhancement as not everyone might happy with auto downloading latest SDK components which consumes their hosted build agent build time resource. Also, there might be a concern about each of introduced license agreements. I am happy if you decided to close this issue or leave it as is as enhancement request. Thanks! 🥇 |
Hi @gedeh , may i ask you to share your scripts here to help us until this issue is resolved? |
Hi @dozgunyal, sorry being away lately, will attach the script soon tonight. Thanks! |
hi @dozgunyal, My build tasks to download, extract, update, and accept SDK licenses scripts content are inline: PowerShell: Download Android SDK to sources directory Extract file: Extract the downloaded SDK zip file PowerShell: Create local.properties file so the build will use downloaded SDK Run cmd: Update local Android SDK Copy files: Copy accepted local build Android SDK licenses note: I have the copy of accepted license files from my PC included in my code repository. the content of this folder are: android-sdk-license, android-sdk-preview-license, intel-android-extra-license. these files are never need to be updated so far Then after SDK is in place, you can run gradle tasks to build, test, etc. If you need clarification of above script please shout, I am happy to help :) Thanks, |
thanks @gedeh |
Hi @DavizOWNS, I get the link from Android SDK Manager window. See the details in Android SDK Manager Log window |
We are moving to a monthly cadence with image updates which alleviates this problem partly, we don't plan to add a feature in the Gradle task. |
When building Android app with latest SDK, support, and Google services, task gradle:assemble with latest gradle wrapper will fail to upgrade the SDK in hosted build agent.
My workaround to allow me build Android with latest SDK components:
The text was updated successfully, but these errors were encountered: