Android应用程序无法上传到设备(过时dexed罐子)罐子、应用程序、设备、Android

2023-09-05 01:23:43 作者:心有芊芊结

我使用的是Android Studio开发这个程序,今天当我试图把它上传到我的设备来测试我有一个弹出式窗口说:

I am using Android Studio to develop this app, and today when I tried to upload it to my device to test I got a popup window saying:

安装失败,因为该设备可能有失效的dexed罐子不匹配当前版本(dexopt错误)。   为了继续,您必须卸载现有的应用程序。

Installation failed since the device possibly has stale dexed jars that don't match the current version (dexopt error). In order to proceed, you have to uninstall the existing application.

警告:卸载将删除该应用程序的数据。

WARNING: Uninstalling will remove the application data!

是否要卸载现有的应用程序?

Do you want to uninstall the existing application?

这给了两个选择,确定或取消。一旦击中OK,下面的消息显示,在Run标签:

It gave two options, OK or Cancel. Upon hitting OK, the following message showed up in the Run tab:

设备shell命令:下午卸载my.bundle.id   未知故障

该应用程序似乎被卸载后,没有一丝它在管理应用程序。 我无法上传应用程序。我试图清理项目和重建,但没有奏效。

The app seems to be uninstalled, the is no trace of it under Manage Applications. I am unable to upload the app. I tried cleaning the project and rebuilding, but it didn't work.

我该怎么办?

推荐答案

我发现DEX文件变得比缓冲大,即使它包含小于64K的方法。然后我启用ProGuard的,它帮助了很多降低DEX文件的大小。

I discovered that the dex file was getting larger than the buffer, even though it contained less than 64k methods. Then I enabled ProGuard and it helped a lot reducing the dex file size.

应用 DEX-方法,计数有很大帮助调试您的DEX文件,不仅受检查方法数,而是哪个包属于

THe application dex-method-counts helps a lot to debug your dex file, by checking not only the number of methods, but to what package they belong