1. Error description
Today, when I compiled the app with Android studio and installed APK, I reported an error as follows:
The APK file build\outputs\apk\OYP_2.3.4_I2Base_6476_official_debug.apk does not exist on disk.
Error while Installing APK
1 2
As shown in the figure below,
2. Solutions
1. Try build – & gt; clean project recompilation or invalid
2. Try to restart Android studio is invalid
Then I went to the build/outputs/APK directory and found that the APK file was compiled, but the file name was:
oyp_ 2.3.4_ I2Base_ 6478_ official_ debug.apk
as shown in the figure below:
So the reason is that the compiled APK file of Android studio is
OYP_ 2.3.4_ I2Base_ 6478_ official_ debug.apk
And it’s going to install the APK file name
OYP_ 2.3.4_ I2Base_ 6476_ official_ debug.apk
as a result, an error will be reported. Google looked up the error and found it in http://stackoverflow.com There is a solution to this error on the website, and the link is as follows:
the http://stackoverflow.com/questions/34039834/the-apk-file-does-not-exist-on-disk
Solution:
as shown in the figure below:
Step 1: click the gradle button in the Android studio sidebar, as shown below
Step 2: refresh the gradle configuration
The third step: recompile, no more error.
Read More:
- Solve the error when installing apk after compiling Android Studio: Error while Installing APK
- com.android.ddmlib . adbcommandrejectedexception: device offline error while installing APK solution
- com.android.ddmlib.AdbCommandRejectedException: device offline Error while Installing APK (How to Fix)
- Re installing Android studio always fails to install SDK when installing software (solution)
- Android Studio: Solve the INSTALL_FAILED_INVALID_APK error
- Solve the problem of available for offline mode in Android studio compilation
- [Unity] Solve the problem of IOException: Failed to Copy… in Unity packaging apk
- Problems encountered by Android Studio: Session’app’: Error Installing APKs
- Detailed steps for installing Visual Studio 2010 + Intel parallel studio Xe 2013 and configuring mpich2
- Commandinvocationfailure: failed to build APK problem record
- Get the startup activity of Android apk
- View the error report after Android APK confusion
- When using ionic to build Android APK, Cordova error is reported: requirements check failed for JDK 1.8 or greater
- [problem record] installed build tools revision 31.0.0 is broken during Android studio compilation
- Android studio simulator architecture choose arm or x86 to solve the problem of missing libraryexception
- [error record] as compilation error (Android support plugin version is too high | upgrade Android studio to the latest version)
- Android studio compilation error: style attribute ‘@ android:attr/windowEnterAnimation ‘not found the ultimate solution
- How to solve the problem of Cannot find module’npmlog’ when installing nodejs under Linux
- Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem
- Solve the problem of prompt couldn’t find path to unrear library after installing unrear in Python