Could Someone help me this problem?
I got this error when I use Ionic & cordova, trying to build the andorid app.
I have tried few way to solve this problem, like:
- reinstall the Java JDK 8
- edit the computer env variable path (JAVA_HOME, PATH...etc)
But none of these work :(
I current use:
- Ionic@1.2.4
- cordova@8.0.0
- Windows 10
- Node.js@11.6.0
- npm@6.5.0-next.0
- jdk 1.8.0_271
⚡ lienlab@CCU_LAB ~ Desktop client HybridApp_Zyxel ionic build android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\lienlab\Desktop\client\HybridApp_Zyxel\hooks\after_prepare\010_add_platform_class.js C:\Users\lienlab\Desktop\client\HybridApp_Zyxel
add to body class: platform-android
will push strings array {"name":"lang","titles":["English (US)","English (UK)"],"values":["en-us","en-gb"]}
android preferences file was successfully generated
ANDROID_HOME=C:\Users\lienlab\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_271
Subproject Path: CordovaLib
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_93e2b48xftftse4tgevu6kz4n.run(C:\Users\lienlab\Desktop\client\HybridApp_Zyxel\platforms\android\build.gradle:138)
BUILD FAILED
Total time: 5.006 secs
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> The SDK directory 'C:\Users\User\AppData\Local\Android\sdk' does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(node:14808) UnhandledPromiseRejectionWarning: 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'.
> The SDK directory 'C:\Users\User\AppData\Local\Android\sdk' does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
at ChildProcess.whenDone (C:\Users\lienlab\Desktop\client\HybridApp_Zyxel\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at ChildProcess.emit (events.js:188:13)
at maybeClose (internal/child_process.js:978:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
(node:14808) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14808) [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.