Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
777 views
in Technique[技术] by (71.8m points)

android - "Java.exe" exited with code 1 (Proguard issue)

I get the following error when I build my Xamarin.Android app in Release.

"Java.exe" exited with code 1

Here is the output...

...    
1> java.io.IOException: Can't read [C:UsersFranciscoJavierAppDataLocalAndroidandroid-sdkplatformsandroid-24android.jar] (Can't process class [java/nio/charset/CharsetDecoder.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))
1> at proguard.InputReader.readInput(InputReader.java:230)
1> at proguard.InputReader.readInput(InputReader.java:200)
1> at proguard.InputReader.readInput(InputReader.java:178)
1> at proguard.InputReader.execute(InputReader.java:100)
1> at proguard.ProGuard.readInput(ProGuard.java:196)
1> at proguard.ProGuard.execute(ProGuard.java:78)
1> at proguard.ProGuard.main(ProGuard.java:492)
1> Caused by: java.io.IOException: Can't process class [java/nio/charset/CharsetDecoder.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7))
1> at proguard.io.ClassReader.read(ClassReader.java:112)
1> at proguard.io.FilteredDataEntryReader.read(FilteredDataEntryReader.java:87)
1> at proguard.io.JarReader.read(JarReader.java:65)
1> at proguard.io.DirectoryPump.readFiles(DirectoryPump.java:65)
1> at proguard.io.DirectoryPump.pumpDataEntries(DirectoryPump.java:53)
1> at proguard.InputReader.readInput(InputReader.java:226)
1> ... 6 more
1> Caused by: java.lang.UnsupportedOperationException: Unsupported class version number [52.0] (maximum 51.0, Java 1.7)
1> at proguard.classfile.util.ClassUtil.checkVersionNumbers(ClassUtil.java:140)
1> at proguard.classfile.io.LibraryClassReader.visitLibraryClass(LibraryClassReader.java:89)
1> at proguard.classfile.LibraryClass.accept(LibraryClass.java:301)
1> at proguard.io.ClassReader.read(ClassReader.java:86)
1> ... 11 more
1> Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
1>C:Program Files (x86)MSBuildXamarinAndroidXamarin.Android.Common.targets(2118,3): error MSB6006: "java.exe" exited with code 1.
1>Done executing task "Proguard" -- FAILED.
1>Done building target "_CompileToDalvikWithDx" in project "Elfo.VisionShop.Droid.csproj" -- FAILED.
1>
1>Build FAILED.

Reading the output messages it seems there is a problem with ProGuard, somebody know what can I do?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Just update proguard from official site http://proguard.sourceforge.net/ (replace folder in $SDK_DIR/tools/proguard/)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...