cordova prepare android. Without realising it, cordova-android when from version 10 to 8 causing the following side effects:
Incompatible JDK (11 installed) but 1.8 is expectedFirst thing that caught me was the following error:
Everything was working fine. What’s going wrong? I did downgrade to JDK 8 using sdkman.
cordova prepare android` Requirements check failed for JDK 8 ('1.8.*')! Detected version: 11.0.2
It worked, but then the problem was something else. JDK version was incompatible with gradle 8.
sdk install java 8.0.302-zulu
JDK 8 is incompatible with gradle 8Ok, this is too weird right? I must have done something wrong… That’s when I noticed the cordova-android@8 installed. I couldn’t believe -.-‘.
Fixing things up
$ sdk install java 11.0.19-zulu $ sdk default java 11.0.19-zulu # SDK 11 is the required version for platform android@10 # see more here: # https://cordova.apache.org/announcements/2021/07/20/cordova-android-10.0.0.html # Now remove the cordova platform $ cordova platform rm android # Now add the cordova platform with correct version $ cordova platform add cordova-android@11 $ cordova run android --device # And that it. Everything is now working.