无法将 Android 应用上传到设备(过时的 dexed jar) [英] Can't upload Android app to device (stale dexed jars)

查看:29
本文介绍了无法将 Android 应用上传到设备(过时的 dexed jar)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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 jar(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?

它提供了两个选项,确定或取消.点击确定"后,运行"选项卡中会显示以下消息:

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

DEVICE SHELL 命令:pm uninstall 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-method-counts 对调试 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

这篇关于无法将 Android 应用上传到设备(过时的 dexed jar)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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