RSA 8.0.1 (Eclipse 3.6) 中的 Android 编译问题 - NoClassDefFoundError: sun/security/x509/X500Name
我顺利安装了eclipse的ADT插件。当我创建第一个 Android 项目时,我立即收到了下面的编译错误。我发现 sun/security/x509/X500Name
位于 rt.jar 中,因此我尝试将其添加到我的构建路径中,但这会导致项目在编译时占用大量内存(我发现这不寻常)。有人能够解决这个问题吗?我使用的是jdk1.6.0_24。我见过其他模糊的帖子说我需要使用 Sun JDK。我已经在使用它并且我的 JAVA_HOME 中已经有它了。如果您能提供任何帮助,我将不胜感激。谢谢。
java.lang.NoClassDefFoundError: sun/security/x509/X500Name
at com.android.sdklib.internal.build.SignedJarBuilder.writeSignatureBlock(Unknown Source)
at com.android.sdklib.internal.build.SignedJarBuilder.close(Unknown Source)
at com.android.sdklib.build.ApkBuilder.sealApk(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalPackage(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalDebugPackage(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$2.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$1.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.build(Unknown Source)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(Unknown Source)
at org.eclipse.core.internal.events.AutoBuildJob.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
I installed the ADT plugin for eclipse smoothly. When I created my first Android project, right off the bat, I got the compile error below. I found that the sun/security/x509/X500Name
is in the rt.jar so I tried adding that to my build path, but this causes the project to eat a lot of memory while compiling (I find this unusual). Has anyone been able to solve this issue? I'm using jdk1.6.0_24. I've seen other vague posts out there saying I need to use the Sun JDK. I'm already using that and I already have that in my JAVA_HOME. I'd appreciate any help you can provide. Thanks.
java.lang.NoClassDefFoundError: sun/security/x509/X500Name
at com.android.sdklib.internal.build.SignedJarBuilder.writeSignatureBlock(Unknown Source)
at com.android.sdklib.internal.build.SignedJarBuilder.close(Unknown Source)
at com.android.sdklib.build.ApkBuilder.sealApk(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalPackage(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.BuildHelper.finalDebugPackage(Unknown Source)
at com.android.ide.eclipse.adt.internal.build.builders.PostCompilerBuilder.build(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$2.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
at org.eclipse.core.internal.events.BuildManager$1.run(Unknown Source)
at org.eclipse.core.runtime.SafeRunner.run(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuild(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(Unknown Source)
at org.eclipse.core.internal.events.BuildManager.build(Unknown Source)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(Unknown Source)
at org.eclipse.core.internal.events.AutoBuildJob.run(Unknown Source)
at org.eclipse.core.internal.jobs.Worker.run(Unknown Source)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
notfound 类由 Android SDK 的 SignedJarBuilder 使用。解决方案可能是不使用 Android SDK 的签名,而是通过 jarsigner 命令。
我使用 Maven 进行签名 - http://code.google.com/ p/maven-android-plugin/wiki/SigningAPKWithMavenJarsigner。
您可以通过以下方式指定调试签名:
The not found class is used by SignedJarBuilder of the Android SDK. A solution could be not to use the signing of Android SDK, but to sign the created .apk separately, by the jarsigner command.
I did the signing using Maven - http://code.google.com/p/maven-android-plugin/wiki/SigningAPKWithMavenJarsigner.
You can specify the debug signing in the following way:
我安装了一个独立的 Eclipse 3.6 IDE (Helios),它的工作非常顺利。基于此,我得出的结论是,这永远无法与 IBM 的 RSA 8.0.1 一起使用(即使它基于 Eclipse 3.6)。
I installed a stand-alone Eclipse 3.6 IDE (Helios) and it worked like a charm. Based on this, I've come to the conclusion that this will never work with IBM's RSA 8.0.1 (Even though it is based on Eclipse 3.6).