A problem occurred configuring root project 'android' IONIC


#1
BUILD SUCCESSFUL

Total time: 0.745 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) inste
ad.
        at build_5vkf0oyog6n5a5xz8newfhh79.run(/home/package/workspace/apps-b750a540-249/cordova/platforms/android/build.gradle:143)
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (26.0.2) for And
roid Gradle Plugin 3.0.0.
Android SDK Build Tools 26.0.2 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin n
ow has a default version of the build tools.
Checking the license for package Android SDK Build-Tools 26.0.2 in /opt/android-sdk/licenses
Warning: License for package Android SDK Build-Tools 26.0.2 not accepted.
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, Android SDK Build-Tools 26.0.2].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using t
he 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Error: /home/package/workspace/apps-b750a540-249/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, Android SDK Build-Tools 26.0.2].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using t
he 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s

Does someone know how to fix it? I’ve tried everything, but it doesn’t work


#2

Did you?

What is your ionic info output?


#3

Yes, I did.

output:
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
:wrapper

#4

C:\Users{your-username}\AppData\Local\Android\sdk\tools\bin

then run

sdkmanager --licenses

It’ll ask you to accept agreements, you just have to type “y” and enter.
I hope your problem will be fixed


#5

I already did that, the problem still not fixed


#6

I have the same problem, and I can’t figure out what should I do. Could you say what made your problem go away?


#7

Share your errors screenshots here
Thanks