में एक जार का उपयोग करते समय त्रुटि मैं अपने जार बनाने के लिए जावा 1.8 का उपयोग करता हूं।मेरी परियोजना
मैं एक जावा परियोजना में उपयोग कर सकते हैं, लेकिन एक Android परियोजना में, मैं निम्नलिखित त्रुटि है:
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.
Error:1 error; aborting
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Android-tool\JAVA\jdk1.8.0_77\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 6.468 secs
Information:3 errors
Information:0 warnings
Information:See complete output in console
जावा का किस संस्करण का उपयोग किया जाता है? क्या आपने त्रुटि संदेश पढ़ा है और सुझाए गए समाधानों का प्रयास किया है? – Stultuske
शायद, आपका प्रश्न http://stackoverflow.com/questions/23318109/is-it-possible-to-use-java-8-for-android-development – GhostCat
पर कोई डुप्लिकेट है कोई समाधान मिला? – whizzzkey