昨天我的应用在Android Studio上运行完美。但是今天,当我升级到 Android Studio 3.4 Canary 6 时,我开始不断收到以下错误消息:
安装失败,并显示消息无法提交安装会话 带有命令cmd软件包install-commit 1249295977的1249295977。
是 通过卸载现有解决此问题的可能 版本的apk(如果存在),然后重新安装。
错误对话框:
当我单击“确定”然后重新运行时,出现此错误消息。
会话“ app”:安装APK时出错
我试图手动删除该应用程序,但该应用程序已从我的手机中删除。重新启动Android Studio,使缓存无效和重建均无效。
答案 0 :(得分:1)
在我的情况下,我从 Setting-> Build,Execution,Deployment-> Instant Run
禁用Instant Run答案 1 :(得分:0)
检查4种方法:
方法1:关闭“即时运行”
文件>设置>构建,执行,部署>即时运行>取消选中 (启用即时运行以热插拔代码)
方法2:进入构建->清理项目并再次运行
方法3:对于使用小米手机的用户,请按照以下步骤操作:
Settings-> Additional Settings-> Developer opetions
Turn off MIUI Optimization and reboot your phone
Last Disable verify app over USB
方法4:在android studio中运行无效的缓存/重新启动
Choose the File option in windows and preference in mac
Select Invalidate caches/restart.
Click Invalidate and restart.
答案 2 :(得分:0)
就我而言,手机上没有足够的空间。当我尝试通过ADB手动安装应用程序时,出现了明确的错误消息:
$ ./gradlew installDebug
> Task :app:installDebug
07:23:47 V/ddms: execute: running am get-config
07:23:47 V/ddms: execute 'am get-config' on 'R58M45K5MPZ' : EOF hit. Read: -1
07:23:47 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'SM-A205F - 9' for app:debug
07:23:47 D/app-debug.apk: Uploading app-debug.apk onto device 'R58M45K5MPZ'
07:23:47 D/Device: Uploading file onto device 'R58M45K5MPZ'
07:23:47 D/ddms: Reading file permision of /home/egslava/temp/android-projects/RedditTestFeed/app/build/outputs/apk/debug/app-debug.apk as: rw-rw-r--
07:23:48 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
07:23:56 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on 'R58M45K5MPZ' : EOF hit. Read: -1
07:23:56 V/ddms: execute: returning
07:23:56 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
07:23:56 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on 'R58M45K5MPZ' : EOF hit. Read: -1
07:23:56 V/ddms: execute: returning
Installed on 1 device.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
答案 3 :(得分:0)
解决此问题最简单的方法是擦除模拟器的数据并再次运行项目。