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

Issue Type

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

  • Bug Report
  • Feature Request
  • Support Question

I want to upgrade my Android SDK version API Level 28 to 29. So I have added Android platform version 9.0.0. Then I try to build the APK but I am getting the below error.
'Requirements check failed for JDK 8 ('1.8.*')! Detected version: null
Check your ANDROID_SDK_ROOT / JAVA_HOME / PATH environment variables.'

Information

  1. cordova create hello com.example.hello HelloWorld
  2. cd hello
  3. cordova platform add android@9.0.0
  4. cordova build android

Command or Code

I found that check_req.js files line no 223 returns output as null.

Environment, Platform, Device

Platform: Android.

Version information

What are relevant versions you are using?
For example:
Cordova: 8.1.0

23 Answers

✔️Accepted Answer

Master currently has https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/lib/check_reqs.js#L211 and so does v9.0.0 release: https://github.com/apache/cordova-android/blob/rel/9.0.0/bin/templates/cordova/lib/check_reqs.js

Are you sure you're up to date?

Try using cordova@10, the current latest of the cli, then reinstall the android platform:

cordova platform remove android
cordova platform add android

Other Answers:

Hi everyone;

I had the same problem on my Mac; after analyzing my package-lock.json; I had a version of execa:1.0.0 ! I don't know where it comes from.

I removed my package-lock.json and the node_modules, then I did "npm i -D execa". Which will now be in 4.0.3.

That solved my problem.

@MatHackDev I think all you needed to do was remove the package-lock.json & node_modules directory and run npm i to re-checkout the new package. I don't think you need to run npm i -D execa because this would install it at the project level and most likely not be used by cordova-android build scripts.

I also usually remove the platforms and plugins directory when upgrade and run cordova prepare to rebuild them.

I had an issue similar to this, my version check failed because I am running with JDK 15.0.
I saw where the error was coming from so I modified the file at platforms/android/cordova/lib/check_reqs.js to have
EXPECTED_JAVA_VERSION = "15.x" rather than 1.8.x and everything ran fine... Why is it still dependent on JDK 1.8? Should this not have worked?

Related Issues:

92
cordova android Build errors about drawable since upgrading to v8.0.0
Hello all ! This error also appears when I do release build after upgrading to cordva-android@8.0.0 ...
63
cordova android Support new Android App Bundle package format
@jfoclpf I got it working on circle ci The steps are: 4 - Upload app.aab to google play. ...
23
cordova android Back button event on full screen video closes application
add this in MainActivity.java it works. Bug Report Problem As the title suggests attempting to exit ...
17
cordova android Requirements check failed for JDK 8 ('1.8.*')! Detected version: null
Master currently has https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/lib...
12
cordova android java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider
They have updated the AdMob SDK you have to add your appID in the AndroidManifest <application> ...
750
react native keychain SDK Build Tools revision (23.0.1) is too low for project :react-native-keychain.
Ok I found a solution to this For people facing the same problem in the future Hey there ...
748
material components android Manifest merger failed : Attribute application@appComponentFactory
I had similar problem We're transitioning from github issues to a public buganizer component Rather ...
746
expo Error: fsevents unavailable (this watcher can only be used on Darwin)
Possible solution: I had installed watchman via npm install -g watchman but apparently this installs...
459
flutter Multiple commands produce '/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework
I was able to fix it by opening the Runner workspace project in Xcode 10 Then navigate to File ...
449
flutter App Store iOS submission fails: The bundle Runner.app/Frameworks/App.framework does not support the minimum OS Version specified in the Info.plist
After doing a flutter clean changing MinimumOSVersion (inside /ios/Flutter/AppframeworkInfo.plist) t...
418
flutter 'com.android.support:appcompat-v7' has different version for the compile (26.1.0) and runtime (27.0.1) classpath
is like this i receive an error when i run flutter run My gradle.build file is: flutter doctor: ...
409
flutter Why does my text not wrap?
You have to wrap Column in a flexible Without flexible the column's width is not constrained to the ...
383
flutter Unexpected top padding in ListView put inside scaffold with no appBar
Yeah this is intentional If you put a widget before the ListView you should wrap the ListView with a...
315
flutter Missing xcode dependency: Python module "six"
try python2.x -m pip install six by @humblerookie's suggest or brew reinstall python@2 pip install s...
306
expo exp build:android fails
This works exp start Cancel ctrl c then do exp build:android. Running exp build:android errors fails...
285
flutter flutter messaging: set the notification icon
Hey guys I fought with this for the better part of a day For some strange reason there are no tutori...
281
flutter Issue with cloud_firestore - Cannot fit requested classes in a single dex file.
As a workaround you can try enabling mutlidex for Android App by following Enable multidex for apps ...
265
flutter D8: Program type already present: io.flutter.BuildConfig
@smrucv I received the same error but after flutter clean and flutter packages get everything works ...
250
238
flutter Introduction of characters package causes crash on flutter run for preexisting Flutter applications
In my case I resolved the issue with flutter clean After e0ed12c I get this error when building: @ju...
222
nativescript cli TNS doctor doesn't recognize Xcode (High Sierra)
HI @philipfeldmann Can yhou please run xcodebuild -version and paste the output? May be Xcode is ins...
221
flutter Making Network http error SocketException: Failed host lookup
@hoc081098 Double-check / make sure you have <uses-permission android:name=android.permission.INTERN...
216
flutter Support inlining Android/iOS views
iOS view embedding support has landed on master This is still just a preview There are multiple open...
207
flutter ✗ Android license status unknown.
Hi everyone Steps to Reproduce Please tell us what you were doing and what went wrong If you are run...
195
react native mapbox gl No static method toHumanReadableAscii
here is workaround: build.gradle got the following error on runtime: java.lang.NoSuchMethodError: No...
185
flutter idevice_id cannot run on catalina
When you're developing on Catalina Steps to Reproduce Run flutter doctor on macOS Catalina I get the...
181
flutter type 'List<dynamic>' is not a subtype of type 'List<String>'
The problem is your fromMap constructor is reading from a Map<String dynamic> ...
178
flutter TextField is hidden by keyboard inside of a Modal Bottom Sheet
This may not work for all situations but I have a modalBottomSheet that contains only a TextField ...
173
retrofit Kotlin & @Body
You can still use Map just suppress its wildcardness with @JvmSuppressWildcards ...
169
NativeBase Needs to tap twice to fire onPress function when keyboard is open
@bm-software Use keyboardShouldPersistTaps={'handled'} and will works fine. react-native ...
162
react native firebase 🔥(Android) Program type already present: io.invertase.firebase.BuildConfig
I think I found my ultimate error here In my package.json file I had at some point earlier ...
160
flutter Dismissing keyboard programatically
This is a better way as it also clears the focus: FocusScope.of(context).requestFocus(new FocusNode(...
157
flutter How to solve: Android license status unknown and also Android sdkmanager tool not found? Tried everything(as i think)
The answer is here Uncheck Hide Obsolete Packages and you'll see Android SDK Tools (Obsolete) 26.1.1...
156
flutter MissingPluginException: No implementation found for method
@mravn-google Yeah turned out I had to quit the flutter run process and start it up again Just a ful...
156
flutter firebase_auth: ^0.8.0+1 crashes on Android
Here i put this in file: android/gradle.properties: and changed targetSdkVersion to 28 and it worked...
156
react native modal The statusbar turns white when the modal is open (only on certain devices)
statusBarTranslucent property has been added to Modal of RN 0.62 I think this problem has been solve...
153
flutter Android sdkmanager tool not found (C:...\Local\Android\sdk\tools\bin\sdkmanager)
This worked for me: open Android Studio's SDK Manager go to the Android SDK tab under SDK Tools ...
149
flutter 1.22.2 - Flutter plugin not installed; this adds Flutter specific functionality.
Hey @bhanuka96 try this line of code How do I fix this android plugin error? This error is being com...
145
cli pod install failure with glog
what helped me: sudo xcode-select --switch /Applications/Xcode.app Ask your Question I have been try...
144
create react native app issue running on ubuntu 16.04 (watchman)
I got it working by running: OS Info: Run: Output: ...
139
flutter [ios][release] GeneratedPluginRegistrant.m Module not found
I may have found the answer from this comment: #21989 (comment) Seems like by opening up the project...
137
flutter [App.framework] Linked and embedded framework 'App.framework' was built for iOS/iOS Simulator
Does rm -rf ios/Flutter/App.framework get you unstuck? SOLUTION @jmagman has written an article on h...
137
Xposed Let's port Xposed to N
Surprisingly by porting M changes to N everything works well From my experience I can tell you that ...
134
flutter Bad state: Future already completed
I had the same issue.. The problem was the same that @soaresgabriel said but I was not navigating di...
131
create react native app AwesomeProject@0.1.0 start: react-native-scripts start- ERR! Exit status 1
As suggested at the error message installing watchman solved this error for me (OSX 10.9.5) ...
129
flutter Execution failed for task ':app:compileFlutterBuildDebug' Issue
Hi @Ramihtet your logs show a different flutter version; could you please run flutter channel stable...
126
capacitor FileReader API not firing
You can try this. Description of the problem: In my project I'm trying to read and convert a Blob do...