(转换为 Dalvik 格式失败,错误 1 ​​),发布的解决方案都不适合我

发布于 2024-12-14 14:33:05 字数 1074 浏览 0 评论 0原文

我尝试了网上发布的大部分解决方案,但没有一个解决我执行 android 项目的问题。

尝试过的解决方案。 sol 1:清洁和清洁删除所有库后重建项目。 sol 2:将 proguard 文件夹更新到 android sdk 中。

任何人都可以研究一下并向我发送适当的解决方案,为什么 dex 无法转换此异常类。有没有其他方法

错误是... [2011-11-09 17:42:15 - RcsCoreSettings] Dx 处理“javax/sip/TransactionDoesNotExistException.class”时遇到问题:

核心类(java.* 或 javax.*)的不明智或错误使用 当不构建核心库时。

这通常是由于无意中包含了核心库文件造成的 在您的应用程序项目中,当使用 IDE(例如 蚀)。如果您确定您不是有意定义 核心类,那么这是最有可能的解释 正在进行中。

然而,您实际上可能试图在核心中定义一个类 名称空间,您可能已获取其来源,例如, 来自非 Android 虚拟机项目。这将最 肯定不行。至少,它会危及 您的应用程序与平台未来版本的兼容性。 它的合法性也常常受到质疑。

如果你真的打算构建一个核心库——这只是 适合作为创建完整虚拟机的一部分 分发,而不是编译应用程序——然后使用 “--core-library”选项可以抑制此错误消息。

如果您继续使用“--core-library”,但实际上 构建一个应用程序,然后预先警告您的应用程序 在某些时候仍然无法构建或运行。请 为愤怒的客户做好准备,例如,他们发现您的 一旦升级操作,应用程序将停止运行 系统。你将要为这个问题负责。

如果您合法地使用恰好位于 core 包,那么你拥有的最简单安全的替代方案是 重新打包该代码。也就是说,将有问题的类移动到 你自己的包命名空间。这意味着他们永远不会在 与核心系统类冲突。 JarJar 是一个可能有帮助的工具 你在这一努力中。如果您发现自己无法做到这一点,那么 这表明你所走的道路最终将 导致痛苦、痛苦、悲伤和哀叹。

[2011-11-09 17:42:15 - RcsCoreSettings] Dx 1 错误;中止 [2011-11-09 17:42:15 - RcsCoreSettings] 转换为 Dalvik 格式失败,错误 1

I tried most of the solutions posted in the net, but none of them resolved my problem to execute my andriod project.

tried solutions.
sol 1: clean & Rebuild the project after removing all the libraries.
sol 2: updating proguard folder into the android sdk.

Could any one look into this and send me the appropriate solution, why dex is unable to convert this exception class. Is there any alternative way

Error is...
[2011-11-09 17:42:15 - RcsCoreSettings] Dx
trouble processing "javax/sip/TransactionDoesNotExistException.class":

Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.

This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.

However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.

If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.

If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.

If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.

[2011-11-09 17:42:15 - RcsCoreSettings] Dx 1 error; aborting
[2011-11-09 17:42:15 - RcsCoreSettings] Conversion to Dalvik format failed with error 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文