2017-01-06 18 views
0

で返さ:のEclipse - ProGuardのは、私は日食に私のプロジェクトの署名APKを輸出しようとしていますが、私はキーストアを作成し、私はそれをエクスポートするたびに私は、このエラーに直面して、エラーコード1

Proguard returned with error code 1. See console 

これは私のログです:

[2017-01-06 13:40:30 - IPTVPlayer] Dx 
trouble writing output: already prepared 
[2017-01-06 13:40:30 - IPTVPlayer] ------------------------------ 
[2017-01-06 13:40:30 - IPTVPlayer] Android Launch! 
[2017-01-06 13:40:30 - IPTVPlayer] adb is running normally. 
[2017-01-06 13:40:30 - IPTVPlayer] Performing com.simple.iptv.player.Player activity launch 
[2017-01-06 13:40:30 - IPTVPlayer] Automatic Target Mode: using device 'VS9804G11989257' 
[2017-01-06 13:40:30 - IPTVPlayer] Uploading IPTVPlayer.apk onto device 'VS9804G11989257' 
[2017-01-06 13:40:31 - IPTVPlayer] Installing IPTVPlayer.apk... 
[2017-01-06 13:40:35 - IPTVPlayer] Success! 
[2017-01-06 13:40:36 - IPTVPlayer] Starting activity com.simple.iptv.player.Player on device VS9804G11989257 
[2017-01-06 13:40:36 - IPTVPlayer] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.simple.iptv.player/.Player } 
[2017-01-06 13:41:18 - IPTVPlayer] New keystore C:\Users\Bahae Eddine\Desktop\Final Application\apk\IPTVPlayer-Final.apk has been created. 
[2017-01-06 13:41:18 - IPTVPlayer] Certificate fingerprints: 
[2017-01-06 13:41:18 - IPTVPlayer] MD5 : 73:B4:6D:5E:D1:59:FA:EB:34:8D:2F:F7:19:C7:4D:88 
[2017-01-06 13:41:18 - IPTVPlayer] SHA1: 92:7B:11:C3:1C:3B:67:00:BD:2A:5F:DC:7E:EE:BE:7E:25:4E:E8:64 
[2017-01-06 13:41:20 - IPTVPlayer] Proguard returned with error code 1. See console 
[2017-01-06 13:41:20 - IPTVPlayer] Error: Can't read [C:\Program Files\Java\jre1.8.0_111\lib\rt.jar] (Can't process class [com/oracle/net/Sdp$1.class] (Unsupported class version number [52.0] (maximum 51.0, Java 1.7))) 

これは私がいくつかの行を追加している私のProGuardの-project.txtです:

# To enable ProGuard in your project, edit project.properties 
# to define the proguard.config property as described in that file. 
# 
# Add project specific ProGuard rules here. 
# By default, the flags in this file are appended to flags specified 
# in ${sdk.dir}/tools/proguard/proguard-android.txt 
# You can edit the include path and order by changing the ProGuard 
# include property in project.properties. 
# 
# For more details, see 
# http://developer.android.com/guide/developing/tools/proguard.html 

# Add any project specific keep options here: 

# If your project uses WebView with JS, uncomment the following 
# and specify the fully qualified class name to the JavaScript interface 
# class: 
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { 
# public *; 
#} 
-keep class android.support.v4.** { *; } 
-dontwarn android.support.v4.** 
-dontwarn javax.activation.** 
-dontwarn javax.security.** 
-dontwarn java.awt.** 
-libraryjars <java.home>/lib/rt.jar 
-keep class javax.** {*;} 
-keep class com.sun.** {*;} 
-keep class myjava.** {*;} 
-keep class org.apache.harmony.** {*;} 
-keep public class Mail {*;}   
-dontshrink 

これは私のproject.propertiesです:

# This file is automatically generated by Android Tools. 
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! 
# 
# This file must be checked in Version Control Systems. 
# 
# To customize properties used by the Ant build system edit 
# "ant.properties", and override values to adapt the script to your 
# project structure. 
# 
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 

# Project target. 

target=android-20 
proguard.config=proguard-project.txt 
android.library.reference.1=../google-play-services_lib 
+0

このエラーは、ProGuardがJava 7以下のみをサポートしていることを示しています。 – Zircon

+0

どのようにコンパイルのターゲットバージョンを変更できますか? –

答えて

0

エラーメッセージはそれをすべて言う:(Unsupported class version number [52.0] (maximum 51.0, Java 1.7)))

=>は、Java 7または変更を使用する必要がありますは、Java 8を使用しているが、ProGuardのはそのためのJava 7をサポートしていますJava 7(1.7)へのあなたのプロジェクトの目標バージョンをコンパイルします。

とにかくAndroidStudioに切り替える必要があります。これは、EclipseのAndroid開発がサポートされなくなったためです。

+0

コンパイルターゲットを1.7に変更しましたが、同じ問題が発生しました:http://i.imgur.com/4cen1Jc.png –

+0

付属のJARファイルをチェックしましたか?少なくとも1つはJava 8でコンパイルされていると仮定します。 – Robert

+0

と、どうすればJava 7でそれらをコンパイルできますか?ありがとうございました –