Dex: Error converting bytecode to dex:


I have not changes/updated anything, Please help?

Dex: Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java 8 or above.
If you are using the 'java' gradle plugin in a library submodule add
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
java.lang.RuntimeException: Exception parsing classes


Did you find a solution for this? I am having the same issue and not sure what has changed, I was able to build for Android fine previously.


I’m having the same issue. Didn’t change a single thing. Tried updating the gradle version but still no luck. Please let me know if you’re able to figure this out. Thanks in advance.


After hours of messing about making changes to and the build.gradle file without getting anywhere I managed to solve it by doing the following:

Remove Android platform:

cordova platform remove android

Added latest Android platform (7.1.4):

cordova platform add android@latest

Just to note I am using Cordova 7.1.0 if that makes a difference.

Hopefully, that helps, if not let me know if you need any more information from me.

1 Like

I am also just now having this problem out of the blue. I did a build for QA a couple of weeks ago. Moved onto some backend code. Today I go to build for production and I get this problem?
We have been kind of stuck on Android 6.3 (Tried to upgrade to 6.4 but got nowhere)
I have tried removing Android and adding 6.3 back.
We have also not updated cordova it seemed like they would not support android 5.0 or less which we still have customers using it. (why I don’t know).

Any help would be great.