Cordoba failed to add platform, but it is abnormal. Major.minor version 52.0 is not supported
I am trying to create a simple Cordova example, and then perform the following steps. When I add a platform, an error message "unsupported major.minor version 52.0" will be displayed. Please help. Thank you in advance
pace:
1. Install Cordova through NPM install - G Cordova 2. Cordova creates an application and creates a hello com.example.hello HelloWorld 3. Try to add Android platform through Cordova platform
To resolve this error, try installing Android SDK 23, 24 and 25. 4. Also check Cordoba's requirements, which shows that gradle is installed
I deleted the Android platform and tried to add it again. I encountered the same error
Error:
cordova platform add android
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.example.hello
Name: HelloWorld
Activity: MainActivity
Android target: android-24
Subproject Path: CordovaLib
Android project created with cordova-android@6.0.0
Installing "cordova-plugin-whitelist" for android
ANDROID_HOME=C:\Users\Richa\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jre7
Subproject Path: CordovaLib
FAILURE: Build Failed with an exception.
* Where:
Build file 'G:\Pogeyan\Projects\cordova test\sample\hello\platforms\android\build.gradle' line: 20
* What went wrong:
A problem occurred evaluating root project 'android'.
> java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD Failed
Total time: 5.76 secs
Failed to install 'cordova-plugin-whitelist':Error: cmd: Command Failed with exit code 1
at ChildProcess.whenDone (G:\Pogeyan\Projects\cordova test\sample\hello\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
Error: cmd: Command Failed with exit code 1
Node version: v4.4.7
Cordova version: 6.4.0
resolvent:
I have the same error. Please downgrade Cordova version:
npm uninstall -g cordova
npm install -g cordova@5.4.1