RSA 8.0.1 (Eclipse 3.6) 中的 Android 编译问题 - NoClassDefFoundError: sun/security/x509/X500Name

发布于 2024-10-30 16:40:49 字数 1770 浏览 1 评论 0原文

我顺利安装了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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

月亮邮递员 2024-11-06 16:40:49

notfound 类由 Android SDK 的 SignedJarBuilder 使用。解决方案可能是不使用 Android SDK 的签名,而是通过 jarsigner 命令。

我使用 Maven 进行签名 - http://code.google.com/ p/maven-android-plugin/wiki/SigningAPKWithMavenJarsigner

您可以通过以下方式指定调试签名:

   <keystore>
    ${user.home}${file.separator}.android${file.separator}debug.keystore
   </keystore>
   <storepass>android</storepass>
   <keypass>android</keypass>
   <alias>androiddebugkey</alias>

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:

   <keystore>
    ${user.home}${file.separator}.android${file.separator}debug.keystore
   </keystore>
   <storepass>android</storepass>
   <keypass>android</keypass>
   <alias>androiddebugkey</alias>
相守太难 2024-11-06 16:40:49

我安装了一个独立的 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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文