0

Error: cmd: 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.

Aman Gojariya
  • 1,289
  • 1
  • 9
  • 21
  • I have not used android studio and my OS is Windows OS. – Aman Gojariya Nov 15 '17 at 09:29
  • Possible duplicate of [You have not accepted the license agreements of the following SDK components](https://stackoverflow.com/questions/39760172/you-have-not-accepted-the-license-agreements-of-the-following-sdk-components) – Suraj Rao Nov 15 '17 at 09:39

1 Answers1

2

I have not been able to get the various proposed solutions to work.

cd "%ANDROID_HOME%\tools\bin"
sdkmanager --licenses

no longer works.

I found that running

sdkmanager --update

asked me to accept the license

and then failed due to the tools folder being in use.

Notwithstanding, the license problem seemed to be fixed.

The contents of the license file is now:

8933bad161af4178b1185d1a37fbf41ea5269c55
d56f5187479451eabf01fb78af6dfcb131a6481e

Hope this helps others that have wasted as much time as I on this.

jcsubmit
  • 146
  • 2
  • 9