2
votes

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. Error while Installing 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 !!! In outputs there is only log !!! How is it possible? What can I do?

Thank you all

2
You need to build your app before you can install it. This started happening with me too after most recent android studio update. Click on Build then click on make project and it's done.Ravinder Bhandari
Yes indeed very good !! so how did you turn it? I've already done Sync Gradle and then Build> Rebuild Project but it did not work !!!Andrea
sorry mate, but that's all I did and it worked. You can try restarting studio or wait until someone finds a proper solution to your problem.Ravinder Bhandari
Ok, thank you very much the sameAndrea
Do invalidate caches and restart your android studio.Koustuv Ganguly

2 Answers

4
votes

I managed to solve these simple steps:

1 - I went to the android studio on Build -> Clean Project       After waiting for it to end. 2 - I'm back on Build -> Rebuild Project

3 - I resynchronized with Gradle.

With these simple steps I managed to solve !!!

0
votes

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. Then I removed interceptor but forgot to remove Proguard rules.

This error appeared in the next day. I couldn't build a project, even reinstalled AS. Then I built an apk with Build > Generate Signed Bundle / APK. There I saw warnings:

AGPBI: {"kind":"warning","text":"Missing class: android.arch.paging.PositionalDataSource","sources":[{}],"tool":"D8"}

AGPBI: {"kind":"warning","text":"The rule -keep public class *extends androidx.versionedparcelable.VersionedParcelable {\n \u003cinit\u003e();\n} uses extends but actually matches implements.","sources":[{}],"tool":"D8"} AGPBI: {"kind":"warning","text":"Type org.conscrypt.Conscrypt was not found, it is required for default or static interface methods desugaring of void 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"}

Then I removed unnecessary lines from Proguard. See How to resolve D8 warning: D8: Type `org.conscrypt.Conscrypt` was not found.

UPDATE

After several hours a problem disappeared even if I reverted to previous commits. Also it didn't reproduce on another PC. Android Studio is weird.

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).

enter image description here

UPDATE 2

I use Retrofit and keep all response files (JSON structures) in one package. I had to add them to 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"}".