【发布时间】:2014-08-16 09:54:21
【问题描述】:
我正在尝试从 Eclipse 获取签名的 APK。我有一个运行良好的可调试 apk 版本。现在发布,当我尝试使用 Eclipse ADT 编译和签名时,我收到了很多警告,其中大部分是 can't find superclass or interface some.package.Class。所以,我提到了this、this 和许多其他不幸的是我无法到达任何地方!
我也收到Note: there were 314 duplicate class definitions. 警告
我的 progaurd-project.txt 之前没有动过。因此,我为/EcliseProject/libs/ 文件夹中的每个罐子添加了-libraryjars /libs/lib-name。所以我想出了以下内容:
-libraryjars /libs/android-support-v4.jar
-libraryjars /libs/apache-mime4j-core-0.7.2.jar
-libraryjars /libs/gcm.jar
-libraryjars /libs/httpclient-4.3.3.jar
-libraryjars /libs/httpcore-4.3.2.jar
-libraryjars /libs/httpmime-4.3.3.jar
-libraryjars /libs/library.jar
-libraryjars /libs/nineoldandroids-2.4.0.jar
到此结束时,我收到了 1800 多个警告,其中大多数都没有找到上面提到的超类或接口。所以,我得到了包含这些类的罐子,并将它们也放在 /lib/ 文件夹中,并添加了 -libraryjars 条目,包括 rt.jar 等。然后我收到了更多警告,其中一些人说 library class org.xmlpull.v1.XmlPullParser depends on program class java.lang.String。
我尝试添加-dontskipnonpubliclibraryclasses,添加一些-dontwarn,等等。到目前为止没有任何效果。
在某些时候,我保留了足够的-dontwarn以便制作 apk,但它只是调出登录屏幕(第一个活动),并且一旦单击按钮就会卡在那里。
我想我错过了一些非常基本的东西。 这些天来,我一直在使用正常工作的调试模式 apk 进行测试。为什么会出现这个问题?请帮忙!!
【问题讨论】:
标签: android eclipse adt proguard release-mode