Error running build p/ android - IONIC 3

Asked

Viewed 2,709 times

0

I’m working on an application with Ionic 3 and when I tried to turn the remote ionic cordova build android, a number of errors occur.

Console indicates an issue with environment variables ANDROID_SDK_ROOT and ANDROID_HOME. I tried to configure them manually, but the error persists. Follow the copy of cmd:

Cordova build android Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=Undefined (Recommended Setting) ANDROID_HOME=C: Users Ricardo.Mello Appdata Local Android Sdk (DEPRECATED) Could not find an installed version of Gradle either in Android Studio, or on your system to install the Gradle wrapper. Please include Gradle in your path, or install Android Studio [ERROR] An error occurred while running subprocess Cordova.

Cordova build android exited with Exit code 1.

Re-running this command with the --verbose flag may provide more information.

  • Installed the Android Studio?

  • No, the error is not in the variables, that is just a suggestion, put the whole log. If it is the same error as the other question then DO NOT ASK a new question, edit the other one. Locks are not a question ban, there is a yellow box that explains what is wrong with the question, fix it and vote to reopen, if the log has no details then run ionic cordova build android --verbose and copy the log into the other question. If the question is written according to the quality criteria of the site and the problem is clearer then I will also vote to reopen it

1 answer

0

I managed to make it work by adding the paths this way:

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • No, the problem is not in the variables, ANDROID_HOME is obsolete (DEPRECATED), but did not stop working, so much so that even without ANDROID_SDK_ROOT the Ionic Cordova compiles still, I made it clear in the comment I made in the question https://answall.com/questions/416218/erro-when-running-o-build-p-android-Ionic-3#comment810651_416218, the author needs to put the whole log, his problem is another. It is not only make it work, if it were lack of configuration or would arrive at that point of the log (that this partial).

  • @Guilhermenascimento okay

  • 1

    Thank you, I’ll test.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.