the cmd cordova run android fails with this message:
Android Studio project detected
ANDROID_HOME=C:\Users\LS\AppData\Local\Android\Sdk\tools
JAVA_HOME=C:\PROGRA~1\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
* Where:
Script 'C:\Users\LS\Desktop\ionic\ionic_1\cutePuppyPics\platforms\android\CordovaLib\cordova.gradle' line: 68
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
ionic cordova requirements
returns:
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26,android-25,android-24,android-22,android-21
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\gradle
Requirements check results for ios:
Apple macOS: not installed
Cordova tooling for iOS requires Apple macOS
(node:1436) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Some of requirements check failed
(node:1436) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
according cordova requirements
everything is fine, too:
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26,android-25,android-24,android-22,android-21
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.1\bin\gradle
Requirements check results for ios:
Apple macOS: not installed
Cordova tooling for iOS requires Apple macOS
(node:11480) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): CordovaError: Some of requirements check failed
(node:11480) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
yep. I have added android as platform and still get this error:
PS E:\Work\apps\app_1\cutePuppyPics> cordova run android
Android Studio project detected
ANDROID_HOME=C:\Users\LS\AppData\Local\Android\Sdk\tools
JAVA_HOME=C:\PROGRA~1\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
* Where:
Script 'E:\Work\apps\app_1\cutePuppyPics\platforms\android\CordovaLib\cordova.gradle' line: 68
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
* 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 4s
(node:11644) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* Where:
Script 'E:\Work\apps\app_1\cutePuppyPics\platforms\android\CordovaLib\cordova.gradle' line: 68
* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.
* 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 4s
(node:11644) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS E:\Work\apps\app_1\cutePuppyPics>
Could it be possible, that my android build tools are too new?
I had similar issues with the latest version of JDK.