Ionic run android not working on v2


#1

BUILD FAILED

Total time: 3.424 secs

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 24].
    Before building your project, you need to accept the license agreements and comp
    lete the installation of the missing components using the Android Studio SDK Man
    ager.
    Alternatively, to learn how to transfer the license agreements from one workstat
    ion 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.

#2

Did you google your error message before posting here? #1 is a result right here in the forum…

Open Android Studio, accept the lincense agreements, done.

Also: Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.


#3

where to accept the lincense agreement in android sdk?


#4

With Android Studio. You can find android sdk manager in there


#5

I use this command

android update sdk --no-ui

#6

@mich356c I already run this command. but in my cmd

‘android’ is not recognized as an internal or external command

this error show


#7

Then you also didn’t correctly install Android SDK.

(Why not just install Android Studio that takes care of all of that?)


#8

To use android in the terminal you need the path configured:


#9

This looks similar to my build error for Android. To solve this, I installed the latest version of Android studio, and let it rebuild the gradle for me. This will also require you to use the SDK manager to install, update, and accept terms of the firmware you are targeting. Don’t forget to ionic platform remove android before building the gradle, and then add the platform after Android Studio does its thing.


#10

Build successfully launch…:grinning:

I forgot to install (SDK Platform) from Android SDK Manager.