在使用INSTALL_FAILED_DEXOPT GreenDao [英] INSTALL_FAILED_DEXOPT when using GreenDao

查看:207
本文介绍了在使用INSTALL_FAILED_DEXOPT GreenDao的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想简化Android应用数据库的使用。

I wanted to simplify the usage of DB in an Android app.

对于这一点,我比较了创建一个DAO层的一些第三方库。

For this, I've compared some third party libraries that create a DAO layer.

我已经想出了名为 GreenDao (一个漂亮的图书馆presentation一下 这里 )。该网站显示,它比其他竞争对手(如ORMLite)更快,为Android进行了优化。

I've come up with a nice library called "GreenDao" (presentation about it here) . The website shows that it's faster than other competitors (like ORMLite) and is optimized for Android.

由于某些原因,某些设备(通常是旧设备,符合GB),我在尝试安装应用程序时的下一个控制台错误的:

For some reason, on some device (usually old devices, with GB) , I get the next console error when trying to install the app:

Installation error: INSTALL_FAILED_DEXOPT
Please check logcat output for more details.
Launch canceled!

我搜索了这个错误的原因,但无法找到如何解决它。许多人抱怨这个错误,但我不能找出为什么会发生,什么可以做的。

I've searched for the reason of this error, but couldn't find out how to solve it. Many complain about this error, but I can't find out why it occurs, and what can be done.

该错误是相当普遍的和已知的,但它从来没有提到使用这个库,但是当我删除此库的使用的结果,一切工作正常...

The error is quite common and known, but it's never mentioned as the result of using this library, yet when I remove the usage of this library, everything works fine...

另外请注意,在较新的设备(如Nexus 4),它安装和工作得很好,而且样品本身也能正常工作,无论我测试它的设备。

Also note that on newer devices (like nexus 4) it installs and works just fine, and that the sample itself also works fine no matter which device I test it on.

为什么会出现这种问题?

Why does it occur?

是否有可能在类的结构实在太多了旧设备加载,因为我们用到其他库?

Is it possible that the structure of the classes is just too much for old devices to load, since we use other libraries ?

难道说我已经达到由Android应用支持code的限制吗?

Could it be that I've reached the limit of code that is supported by android apps?

JAR文件本身只需要87KB ...

The jar file itself takes just 87KB ...

我该如何解决呢?

推荐答案

好吧,我已经找到了问题和解决方案:

Ok, I've found the problem and the solution:

它无关GreenDao。

It has nothing to do with GreenDao.

这是因为应用程序使用了太多的酒坛,也许Android有code的限制。

It's because the app uses too many jars, so maybe Android has a limitation of code.

解决方案是可以删除非必要的jar文件或删除大量code的。

The solution is to either delete un-needed jar files or delete a lot of code.

这篇关于在使用INSTALL_FAILED_DEXOPT GreenDao的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆