Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.1k views
in Technique[技术] by (71.8m points)

java - Requirements check failed for JDK 8 ('1.8.*')! Detected version: null

I am trying to generate .apk file for my angular application.

To generate apk used -
cordova build android

after some process it generate error.

I have also set user variables and system variables
ANDROID_HOME = C:UsersuserAppDataLocalAndroidSdk
??JAVA_HOME = C:Program FilesJavajdk1.8.0_271
?????PATH = ...;C:Program FilesJavajdk1.8.0_271in;
?????????C:UsersuserAppDataLocalAndroidSdkools;
?????????C:UsersuserAppDataLocalAndroidSdkplatform-tools

echo %JAVA_HOME% is printing => C:Program FilesJavajdk1.8.0_271
java -version => java version "1.8.0_271"
???????Java(TM) SE Runtime Environment (build 1.8.0_271-b09)
???????Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
gradle -v => Gradle 5.6.3
cordova -v => 9.0.0 ([email protected])
cordova platform version android => Installed platforms:
?????????????????android 9.0.0

Android Studio installed => 4.0.0

my error is

ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=C:UsersuserAppDataLocalAndroidSdk (DEPRECATED)
Using Android SDK: C:UsersuserAppDataLocalAndroidSdk
Requirements check failed for JDK 8 ('1.8.*')! Detected version: null
Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

New versions have some issues so after downgrading gradle and android version, I have restarted my system and again folowing this steps worked for me-
https://medium.com/@christof.thalmann/convert-angular-project-to-android-apk-in-10-steps-c49e2fddd29

as I was trying to create apk for angular app.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...