Click here to Skip to main content
16,017,297 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am created new cordova app, when i build i get below error.

D:\Mobile\hel>cordova build android --stacktrace
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=C:\Android\android-sdk (recommended setting)
ANDROID_HOME=C:\Android\android-sdk (DEPRECATED)
Using Android SDK: C:\Android\android-sdk
Subproject Path: CordovaLib
Subproject Path: app
Specifying custom build file location has been deprecated. This is scheduled to be removed in Gradle 8.0. Consult the upgrading guide for further information: https://docs.gradle.org/7.1.1/userguide/upgrading_version_7.html#configuring_custom_build_layout

FAILURE: Build failed with an exception.

* Where:
Script 'D:\Mobile\hel\platforms\android\cdv-gradle-name.gradle'

* What went wrong:
Could not compile script 'D:\Mobile\hel\platforms\android\cdv-gradle-name.gradle'.
> startup failed:
  General error during conversion: Unsupported class file major version 62


What I have tried:

I try to add org.gradle.warning.mode=all in gradle properties, still getting same error.
Below are versions i have in Gradle and Android.

D:\Mobile\hel>gradle -v

------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          18.0.2 (Oracle Corporation 18.0.2+9-61)
OS:           Windows 11 10.0 amd64

D:\Mobile\hel>cordova -v
11.0.0


Any one resolve much appreciated.

Thanks
Posted
Updated 11-Oct-22 20:01pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900