Java 1.7 compatibility problem
See original GitHub issueHi, 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:
- Created 7 years ago
- Comments:16 (7 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
@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!