[英]app-debug.apk does not exist on disk. Error while Installing APK
Hello everyone trying to launch my app (which has always worked until today !!!) continues to present this error: 大家好,尝试启动我的应用程序(一直运行到今天!!!)继续出现此错误:
The APK file C:\\Users\\User\\Documents\\App 0.0\\Dooale\\app\\build\\outputs\\apk\\debug\\app-debug.apk does not exist on disk.
APK文件C:\\ Users \\ User \\ Documents \\ App 0.0 \\ Dooale \\ app \\ build \\ outputs \\ apk \\ debug \\ app-debug.apk在磁盘上不存在。 Error while Installing APK
安装APK时出错
I tried to verify on my PC in the indicated path: C: \\ Users \\ User \\ Documents \\ App 0.0 \\ Dooale \\ app \\ build \\ outputs \\ and actually does not exist !!! 我试图在PC上按指示的路径进行验证:C:\\ Users \\ User \\ Documents \\ App0.0 \\ Dooale \\ app \\ build \\ outputs \\,但实际上不存在! In outputs there is only log !!!
在输出中只有日志! How is it possible?
这怎么可能? What can I do?
我能做什么?
Thank you all 谢谢你们
I managed to solve these simple steps: 我设法解决了这些简单的步骤:
1 - I went to the android studio on Build -> Clean Project After waiting for it to end. 1-等待它结束后,我去了Build-> Clean Project上的android studio。 2 - I'm back on Build -> Rebuild Project
2-我回到Build-> Rebuild Project
3 - I resynchronized with Gradle. 3-我与Gradle重新同步。
With these simple steps I managed to solve !!! 通过这些简单的步骤,我设法解决了!
This stupid error wasted a whole day of research. 这个愚蠢的错误浪费了整整一天的研究时间。
Recently I have replaced REST library Fuel
with Retrofit
and added OkHttp
logging interceptor with it's Proguard
rules. 最近,我用
Retrofit
替换了REST库Fuel
,并OkHttp
Proguard
规则添加了OkHttp
日志拦截器。 Then I removed interceptor but forgot to remove Proguard rules. 然后,我删除了拦截器,但忘记删除Proguard规则。
This error appeared in the next day. 此错误在第二天出现。 I couldn't build a project, even reinstalled AS.
我无法构建项目,甚至无法重新安装AS。 Then I built an
apk
with Build > Generate Signed Bundle / APK
. 然后,我建立了一个
apk
与Build > Generate Signed Bundle / APK
。 There I saw warnings: 我在那里看到警告:
AGPBI: {"kind":"warning","text":"Missing class: android.arch.paging.PositionalDataSource","sources":[{}],"tool":"D8"}
AGPBI:{“ kind”:“警告”,“ text”:“缺少的类:android.arch.paging.PositionalDataSource”,“ sources”:[{}],“ tool”:“ D8”}
AGPBI: {"kind":"warning","text":"The rule
-keep public class *extends androidx.versionedparcelable.VersionedParcelable {\\n \
uses extends but actually matches implements.","sources":[{}],"tool":"D8"} AGPBI: {"kind":"warning","text":"Type();\\n} org.conscrypt.Conscrypt
was not found, it is required for default or static interface methods desugaring ofvoid okhttp3.internal.platform.ConscryptPlatform.configureSslSocketFactory(javax.net.ssl.SSLSocketFactory)
","sources":[{"file":"C:\\Users\\user\\.gradle\\caches\\modules-2\\files-2.1\\com.squareup.okhttp3\\okhttp\\3.12.0\\b36f4a04584c0fb0d9af2d3401cdff8dacb1ea54\\okhttp-3.12.0.jar"}],"tool":"D8"}AGPBI:{“ kind”:“警告”,“ text”:“
-keep public class *extends androidx.versionedparcelable.VersionedParcelable {\\n \
规则的();\\n} -keep public class *extends androidx.versionedparcelable.VersionedParcelable {\\n \
使用扩展,但实际上与工具匹配。” ,“ sources”:[{}],“ tool”:“ D8”} AGPBI:{“ kind”:“ warning”,“ text”:“类型();\\n} org.conscrypt.Conscrypt
未找到,默认或必需静态接口方法的void okhttp3.internal.platform.ConscryptPlatform.configureSslSocketFactory(javax.net.ssl.SSLSocketFactory)
“,” sources“:[{” file“:” C:\\ Users \\ user \\ .gradle \\ caches \\ modules -2 \\文件-2.1 \\ com.squareup.okhttp3 \\ okhttp \\ 3.12.0 \\ b36f4a04584c0fb0d9af2d3401cdff8dacb1ea54 \\ okhttp-3.12.0.jar “}],” 工具 “:” D8" }
Then I removed unnecessary lines from Proguard. 然后,我从Proguard中删除了不必要的行。 See How to resolve D8 warning: D8: Type `org.conscrypt.Conscrypt` was not found .
请参阅如何解决D8警告:D8:找不到类型org.conscrypt.Conscrypt 。
UPDATE UPDATE
After several hours a problem disappeared even if I reverted to previous commits. 几个小时后,即使我恢复了以前的提交,问题仍然消失了。 Also it didn't reproduce on another PC.
而且它没有在另一台PC上再现。 Android Studio is weird.
Android Studio很奇怪。
In order not to rebuild the project every time at every change in code I added this to configuration (see Android Studio not deploying changes to app ). 为了避免每次更改代码时都重建项目,我将其添加到配置中(请参阅Android Studio不将更改部署到app )。
UPDATE 2 更新2
I use Retrofit and keep all response files (JSON structures) in one package. 我使用Retrofit并将所有响应文件(JSON结构)保存在一个包中。 I had to add them to
proguard-rules.pro
: 我必须将它们添加到
proguard-rules.pro
:
-keep class com.example.data.network.model.** { *; }
If I remove this line, an application won't compile with message: "AGPBI: {"kind":"warning","text":"Missing class: android.arch.paging.PositionalDataSource","sources":[{}],"tool":"D8"}". 如果我删除此行,则应用程序将不会编译并显示以下消息:“ AGPBI:{” kind“:” warning“,” text“:” Missing class:android.arch.paging.PositionalDataSource“,” sources“:[{ }], “工具”: “D8”}”。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.