新手求助,android studio3.4 编译运行时出错

gzwlj2001 2019-06-18 11:34:24
什么代码也没写就是按书上说的新建一个项目后直接编译运行,但出这个错:

Installation failed with message Failed to commit install session 1223832994 with command pm install-commit 1223832994. Error: INSTALL_FAILED_DEXOPT: Package couldn't be installed in /data/app/com.example.linlonghrma-1: scanPackageLI.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.

WARNING: Uninstalling will remove the application data!

Do you want to uninstall the existing application?



...全文
137 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gzwlj2001 2019-06-18
  • 打赏
  • 举报
回复
总算解决了,不是安装问题,解决方法是 先关闭模拟器,
1.File->settings->Bulid.Exec....->Debug->Instant Run->把勾去了
2.Build > Clean Project
3.再运行就Hello World! 了
江南:-) 2019-06-18
  • 打赏
  • 举报
回复
我用#CSDN#这个app发现了有技术含量的博客,小伙伴们求同去《Android Studio安装遇见的那些bug 新手教程》, 一起来围观吧 https://blog.csdn.net/qq_39131246/article/details/90039418
江南:-) 2019-06-18
  • 打赏
  • 举报
回复
as 安装出错了吧
gzwlj2001 2019-06-18
  • 打赏
  • 举报
回复
停用instant run后,现在又出一个新的错:
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?
gzwlj2001 2019-06-18
  • 打赏
  • 举报
回复
我在网上查了下,停用instant run 后又出一个新的错误,真是晕呀

80,352

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧