即使使用 Sun JDK,.apk 签名也会失败(java.lang.NoClassDefFoundError:com.android.jarutils.DebugKeyProvider)
无论我是否使用调试密钥,我在签署 Android 应用程序时都遇到一个有趣的问题。无论我安装到 /usr/bin/{java,keytool,jarsigner}
的 JDK(OpenJDK 还是 Sun 的 JDK),成功编译后总会给出以下输出:
-package-debug-sign: [apkbuilder] Creating RemoteNotify-debug-unaligned.apk and signing it with a debug key... BUILD FAILED /home/ianweller/AndroidSDK/platforms/android-7/templates/android_rules.xml:281: The following error occurred while executing this line: /home/ianweller/AndroidSDK/platforms/android-7/templates/android_rules.xml:152: java.lang.NoClassDefFoundError: com.android.jarutils.DebugKeyProvider
应用程序已构建并签名使用带有 ADT 插件的 Eclipse 就可以了(即使没有安装 Sun 的 JDK)。我使用的是 Fedora 12。
我想将我的代码从 Eclipse 中取出并将其移至 git 存储库中,但无法从 ant 构建它不允许这种情况发生。
I'm having an interesting problem signing my Android application, whether or not I'm using a debug key. Regardless of the JDK I have installed to /usr/bin/{java,keytool,jarsigner}
(OpenJDK or Sun's JDK) it will always give the following output after compiling successfully:
-package-debug-sign: [apkbuilder] Creating RemoteNotify-debug-unaligned.apk and signing it with a debug key... BUILD FAILED /home/ianweller/AndroidSDK/platforms/android-7/templates/android_rules.xml:281: The following error occurred while executing this line: /home/ianweller/AndroidSDK/platforms/android-7/templates/android_rules.xml:152: java.lang.NoClassDefFoundError: com.android.jarutils.DebugKeyProvider
The application was built and signed just fine by Eclipse with the ADT plugin (even without Sun's JDK installed). I'm on Fedora 12.
I'm wanting to get my code out of Eclipse and move it into a git repository, but being unable to build it from ant will not allow this to happen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不确定这是否是您的问题,但请注意奇怪的字符,某些字段不能包含空格、逗号、句点等...
Not sure if this is your problem, but watch out for odd characters, some fields cannot have spaces, commas, periods etc...