Gradle plugin - Version incompatibility #380
Replies: 3 comments
-
We are using SDKMan to manage our Java Versions. (We have one project where we still use and old version). Before creating a build you can use the command If you can upgrade your Java version and don't need to keep the old one you simple can run |
Beta Was this translation helpful? Give feedback.
-
Java 11 is required by some android Sdk tools and is what is shipped with android studio. The change from Java 8 to Java 11 came with build tool 31. Trying to use java 8 may lead to unexpected errors when targeting/compiling API 31+ (which requires build tools 31). So if you're stuck on Java 8, you can only safely compile for API 30 using build tools 30. You also have to ensure that your PATH variables lead to the legacy tools (e.g. not the tools from the |
Beta Was this translation helpful? Give feedback.
-
Thank you @breautek for your explanation. |
Beta Was this translation helpful? Give feedback.
-
We are currently using “cordova platform add [[email protected]]”. While building the app, we are getting the error saying "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8”.
Since we are using JAVA 1.8 as a standard, could someone please advise if there is any workaround to get this supported to complete the build process with upgrading to JAVA 11.
Beta Was this translation helpful? Give feedback.
All reactions