导出android app:Proguard返回错误代码2

时间:2014-09-27 16:35:37

标签: android eclipse

我试图在eclipse上导出一个Android应用程序我创建了我的密钥库和别名但是当我点击"完成"我有这个错误:

Proguard returned with error code 2. See console
Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion'
has value '1.7', but '1.8' is required.
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.

我的eclipse.ini是:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
E:/Programmes/Java/jdk1.8.0_20/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Xms1024m
-Xmx1024m

我的路径是:

E:\Programmes\Ruby200-x64\bin;C:\Users\Benoit\AppData\Roaming\npm;%JAVA_HOME%\bin;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools;E:\Programmes\apache-maven-3.2.3\bin

我的Java_HOME是:

E:\Programmes\Java\jdk1.8.0_20

我已经看过几篇SO帖子,但没有一个对我有用,有人有想法吗?

1 个答案:

答案 0 :(得分:1)

首先,

你的错误是:

Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' has value '1.7', but '1.8' is required.

请更新您的Java Runtime Environment。

然后,你收到了这个警告:

Warning: com.google.api.client.extensions.jdo.JdoDataStoreFactory$JdoValue: can't find superclass or interface javax.jdo.spi.PersistenceCapable 

您需要为此自定义proguard.txt的配置:

试试这个:

-dontwarn javax.jdo.**
-dontwarn com.google.api.client.googleapis.extensions.android.gms.**

这不会导致显示警告。

希望它有所帮助。