转换到的Dalvik格式失败,错误1,在控制台视图一个可怕的消息控制台、视图、可怕、错误

由网友(吐个泡泡)分享简介:我已经看到了一些问题,这个话题,但是当我寻找其他的一部分,我有我的错误,我没有发现任何东西,所以我决定后的充分解释的问题。 没有错误都在我的code认可。无处。所有库的增加,外部库项目的成功链接。没有任何迹象表明有什么要出问题了发射。 然而,当我启动应用程序 - 运行,编译和构建(自动) - 我得到一个弹出消息,指出我...

我已经看到了一些问题,这个话题,但是当我寻找其他的一部分,我有我的错误,我没有发现任何东西,所以我决定后的充分解释的问题。

没有错误都在我的code认可。无处。所有库的增加,外部库项目的成功链接。没有任何迹象表明有什么要出问题了发射。

然而,当我启动应用程序 - 运行,编译和构建(自动) - 我得到一个弹出消息,指出我的项目包含错误(S)和我应该请尝试重新启动应用程序之前解决这些问题。

所以,我反复折腾的一些性质,我的同事发现, Android的私人图书馆来检查属性 - > Java构建路径 - >订单和出口(我查过一个unchecked连同其他复选框,之前)。但是,当我运行的应用程序 - 相同的弹出,并在控制台观点如下:(可怕的消息)

  [2013年6月22日二十点55分03秒 -  TheApplication]霉素
故障处理的Java / SQL / Savepoint.class:

不明智或核心类错误的使用(Java。*或使用javax。*)
如果没有建立一个核心库。

这往往是由于在不经意间,包括一个核心库文件
在你的应用程序的项目,使用IDE时(如
蚀)。如果你确定你不是故意定义
核心类,那么这是一个什么样的最可能的解释
怎么回事。

但是,你实际上可能试图在核心定义一个类
命名空间,它的你可能已经采取了例如源,
从一个非Android虚拟机项目。这将最
肯定不行的。至少,它损害了
该平台的未来版本您的应用程序的兼容性。
这往往也是有问题的合法性。

如果你真的打算建立一个核心库 - 这是唯一
合适的,创建一个完整的虚拟机的一部分
分布,而不是编译应用程序 - 然后使用
在--core库选项晚饭preSS此错误消息。

如果继续使用--core库,但实际上
构建一个应用程序,然后谅解,您的应用程序
将仍然无法生成或运行,在某些时候。请
prepared为愤怒的客户谁找到,例如,您的
应用程序停止运行,一旦他们提升自己的工作
系统。你会责怪这个问题。

如果您正在使用合法的一些code恰好是在
核心包,那么最简单安全的替代你是
重新包装一下code。也就是说,移动类问题成
你自己的包的命名空间。这意味着他们将永远不会在
冲突的核心系统类。 JarJar是一种工具,可以帮助
您在这方面。如果你发现你不能做到这一点,那么
即表明该路径你在将最终
导致疼痛,痛苦,悲伤和悔恨。

[2013年6月22日二十时55分03秒 -  TheApplication]霉素1的错误;中止
[2013年6月22日二十时55分03秒 -  TheApplication]转换为的Dalvik格式失败,错误1
 

有没有人得到这个消息?为什么会出现呢?我应该去哪里寻找隐藏库或内部库,我可能甚至不知道?

我已经检查了我的老板和他的同事 - 他们都在项目的同一个库(因为我们正在做这个工作,我们一起显然必须有同样的事情)。那么,我应该去寻找解决这个问题?

解决方案   

有没有人得到这个消息?

是的。事实上,自2009年,虽然。

  

为什么会出现呢?

Dalvik 和 ART

由于在项目中的源$ C ​​$ C,或JAR,你有 java.sql.Savepoint 界面的另一个副本,比另一个来自Android的运行环境。

  

我应该去哪里寻找隐藏库或内部库,我可能甚至不知道?

您的Eclipse类路径中。您可能希望修改你的问题与你的截图。订单和放大器;导出屏幕从构建路径对话框

I've seen a few questions with this topic, but when I search for the other part I have in my error, I don't find anything, so I decided to post a question with the full explanation.

No errors are recognized in my code. Nowhere. All libraries are added, external library projects are successfully linked. There is no indication that anything should go wrong with a launch.

Yet, when I launch the application - Run, compile and build (automatically) - I get a pop up message stating that my project contains error(s) and that I should please fix them before attempting to launch the application again.

So I fiddle around with some properties, my colleague discovers that "Android Private Libraries" has to be checked in Properties -> Java Build Path -> Order and Export (which I've checked an unchecked along with the other check boxes, before). But when I run the application - same pop up, and the following in the Console view: (scary message)

[2013-06-22 20:55:03 - TheApplication] Dx 
trouble processing "java/sql/Savepoint.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.

[2013-06-22 20:55:03 - TheApplication] Dx 1 error; aborting
[2013-06-22 20:55:03 - TheApplication] Conversion to Dalvik format failed with error 1

Has anyone gotten this message before? Why am I getting it? Where should I go look for "hidden libraries" or "internal libraries" that I might not even be aware of?

I've checked with my boss and colleague - they all have the same libraries in the project (since we're working on it together we obviously have to have the same things). So where should I go looking to fix this problem?

解决方案

Has anyone gotten this message before?

Yes. Not since 2009, though.

Why am I getting it?

Because in the source code of your project, or in a JAR, you have another copy of the java.sql.Savepoint interface, other than the one that comes from the Android runtime.

Where should I go look for "hidden libraries" or "internal libraries" that I might not even be aware of?

Your Eclipse classpath. You may wish to edit your question with a screenshot of your "Order & Export" screen from the build path dialog.

阅读全文

相关推荐

最新文章