question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Java 1.7 compatibility problem

See original GitHub issue

Hi, I wanted to add your project into my android stodio project using gradle but I faced this error

Error: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.

Is there any solutions to fix it?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
lemmingapexcommented, Jan 15, 2017

@junaidyasin Glad you were able to get jack options working for your build. Do you have any advice for @am2222?

Internally, the trilateration library uses the Apache Commons Mathematics Library. Judging by the error @junaidyasin posted, it looks like some of the apache common math library is being passed through the jack toolchain, and the virtual machine might be running out of memory. The section of apache common math that gets spit out in this error is in the file FastMathLiteralArrays.java, which contains several long arrays of doubles (these appear to be precomputed values that the math library uses). So a memory exception makes sense. If your machine has more available memory, you might see if it’s possible to allocate more memory to this process. I’m not entirely sure how to do this, but the error suggests that adding something to gradle.properties might work. Something like this would give the vm a maximum of 4GB:

org.gradle.jvmargs=-Xmx4096m

Hope that information is helpful. Let me know if find something that works. Thanks.

1reaction
lemmingapexcommented, Jan 19, 2017

@am2222 Great, glad you got it working. Feel free to hit me up if you have more questions. If you guys found the library helpful, please consider starring trilateration on github. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

java 1.8 versus java 1.7 Compatibility Issue - Stack Overflow
It is only compatible with java 1.7, and will throw exceptions if the Java version is 1.8. @carbocation The reason may well be...
Read more >
Java SE 7 and JDK 7 Compatibility - Oracle
Compatibility is a complex issue. This document discusses three types of potential incompatibilities relating to a release of the Java platform: Source: Source ......
Read more >
How do I manually download and install Java for my Windows ...
Use these simple instructions to manually download and install Java (also known as Java Runtime Environment or JRE) for your Windows computer.
Read more >
How to Fix Unsupported major.minor Version 52.0 Error in Java
In the above example, Java 1.8 is used to compile the code, which is higher than the Java version it is executed on...
Read more >
OpenJDK Life Cycle and Support Policy - Red Hat Customer ...
OpenJDK is the Java Development Kit (JDK) and Java Runtime Environment (JRE) ... RHEL has a proven track record of maintaining binary compatibility...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found