My local build works just fine but when I try to build on the cloud, I get this:
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
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 http://d.android.com/r/studio-ui/export-licenses.html
Again, I ran the SDK tools and verified that all license agreements are good.
BUILD SUCCESSFUL
Total time: 0.773 secs
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_da72lfddgmnh9vbd4lr8pvnv5.run(/home/package/workspace/apps-6beab527-100/cordova/platforms/android/build.gradle:141)
Checking the license for package Android SDK Platform 26 in /opt/android-sdk/licenses
Warning: License for package Android SDK Platform 26 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
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 http://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.
8933bad161af4178b1185d1a37fbf41ea5269c55
BUILD FAILED
Total time: 1.118 secs
Error: /home/package/workspace/apps-6beab527-100/cordova/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
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 http://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.
How you can solve this problem as follow.
Dont ask me why it solves the problem, really dont know what the connection is between these two. But it works.
This worked for me, although the error is different:
Some users have reported the following error in Android package builds:
Failed to install the following SDK components:
[Android SDK Platform 26] The SDK directory (/opt/android-sdk) is not writeable,
please update the directory permissions.
This most likely means your app has specified an unsupported version of the cordova-android platform. To avoid this, please make sure your package.json and config.xml files contain an explicit version number in the version/spec, meaning no ~ or ^ character.
For cordova-android, we recommend this in config.xml: