Hi, I want to build my app but I got some errors. Here is the error;
C:\artemis>ionic cordova build android
> ionic-v1.cmd build
[08:42:49] Invoking sass gulp task.
> cordova.cmd build android
Android Studio project detected
Running command: node C:\artemis\hooks\after_prepare\010_add_platform_class.js C:\artemis
ANDROID_HOME=C:\Users\win10\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk-11.0.2
Requirements check failed for JDK 1.8
[ERROR] An error occurred while running subprocess cordova.
when I check for java version on cmd here is what I get ;
C:\Users\win10>java -version
java version "1.8.0_221"
Java(TM) SE Runtime Environment (build 1.8.0_221-b11)
Java HotSpot(TM) Client VM (build 25.221-b11, mixed mode, sharing).
when I wrote the build code with verbose I am getting this ;
C:\artemis>cordova.cmd build android --verbose
No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Android Studio project detected
Checking for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at C:\artemis\platforms\android\app\src\main\res\xml\config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms\android\platform_www] to platforms\android\app\src\main\assets\www
Wrote out android application name "MyApp" to C:\artemis\platforms\android\app\src\main\res\values\strings.xml
android-versionCode not found in config.xml. Generating a code based on version in config.xml (0.0.1): 1
Wrote out Android package name "io.ionic.starter" to C:\artemis\platforms\android\app\src\main\java\io\ionic\starter\MainActivity.java
Updating icons at platforms\android\app\src\main\res
Updating splash screens at platforms\android\app\src\main\res
Updating resource files at platforms\android
Prepared android project successfully
Executing script found in hooks directory for hook "after_prepare": hooks\after_prepare\010_add_platform_class.js
Running command: node C:\artemis\hooks\after_prepare\010_add_platform_class.js C:\artemis
Command finished with error code 0: node C:\artemis\hooks\after_prepare\010_add_platform_class.js,C:\artemis
No scripts found for hook "before_compile".
ANDROID_HOME=C:\Users\win10\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk-11.0.2
Requirements check failed for JDK 1.8
CordovaError: Requirements check failed for JDK 1.8
at C:\artemis\platforms\android\cordova\lib\check_reqs.js:362:19
at _fulfilled (C:\artemis\platforms\android\cordova\node_modules\q\q.js:834:54)
at C:\artemis\platforms\android\cordova\node_modules\q\q.js:863:30
at Promise.promise.promiseDispatch (C:\artemis\platforms\android\cordova\node_modules\q\q.js:796:13)
at C:\artemis\platforms\android\cordova\node_modules\q\q.js:604:44
at runSingle (C:\artemis\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (C:\artemis\platforms\android\cordova\node_modules\q\q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:61:11)
If somebody can help me, I really appreciate, thanks already.
Have a nice day to everyone !