解决Android Studio编译后安装apk报错:The APK file does not exist on disk
2017-04-26 17:11
423 查看
1、错误描述
今天用Android Studio编译应用后安装APK的时候,报错了,错误如下所示:<code class="hljs applescript has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: "Source Code Pro", monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">The APK <span class="hljs-type" style="box-sizing: border-box;">file</span> build\outputs\apk\OYP_2<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.3</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.4</span>_I2Base_6476_official_debug.apk <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">does</span> <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">not</span> exist <span class="hljs-function_start" style="box-sizing: border-box;"><span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">on</span></span> disk. Error <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">while</span> Installing APK</code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li></ul>
如下图所示
2、解决方法
1、尝试了Build -> Clean Project再编译,还是无效 2、尝试重启Android Studio无效
然后我去打开build\outputs\apk\目录,发现里面编译好了APK文件,不过文件名确实:
OYP_2.3.4_I2Base_6478_official_debug.apk
如下图所示:
因此原因就是,Android Studio编译好之后的APK文件是
OYP_2.3.4_I2Base_6478_official_debug.apk
而它要安装APK文件名确实
OYP_2.3.4_I2Base_6476_official_debug.apk
因此就会报错了。google查了一下错误,在http://stackoverflow.com网站上有一篇关于此错误的解决方法,链接如下所示:
http://stackoverflow.com/questions/34039834/the-apk-file-does-not-exist-on-disk
解决方法:
如下图所示:
第一步:点击Android Studio侧边栏的Gradle按钮,如下所示
第二步:刷新下Gradle的配置
第三步:重新编译即可,不会再报错。
相关文章推荐
- 解决Android Studio编译后安装apk报错:The APK file does not exist on disk
- 解决Android Studio编译后安装apk报错:The APK file does not exist on disk
- 解决Android Studio编译后安装apk报错:The APK file does not exist on disk
- 我的Android进阶之旅------>解决Android Studio编译后安装apk报错:The APK file does not exist on disk
- 解决Android Studio编译后安装apk报错:The APK file does not exist on disk
- 解决Android Studio编译后安装apk报错:The APK file does not exist on disk
- 解决Android Studio编译后安装apk报错:The APK file does not exist on
- Android Studio编译后安装apk报错:The APK file does not exist on disk
- Android Studio编译后安装apk报错:The APK file does not exist on
- Android 错误(The APK file *.apk does not exist on disk Error while Installing APK)解决方法
- Debug 切换 Release 编译i The APK file does not exist on disk.Error while Installing APK
- Android Studio 报 The APK file does not exist on disk
- the apk file apk does not exist on disk以及AndroidStudio修改了代码但是跑到机器上却没任何反应解决方案
- The APK file does not exist on disk
- The APK file xxx.apk does not exist on disk. Error while Installing APK
- The APK file does not exist on disk
- APK file does not exist on disk问题解决
- EmptyThrowable: The APK file does not exist on disk.
- The APK file does not exist on disk.Error while Installing APK
- the apk file does not exist on disk. error while installing apk