Development environment: Android studio
After copying a project, the package name and application ID are modified. After further development of the program, it is found that it cannot be installed on the mobile phone. The error code is: installation failed with message failed to finalize session:INSTALL_ FAILED_ INVALID_ Apk, as shown in the figure below:
It’s a big headache. There will be no error when copying the project (for copying and modifying the project in Android studio, please refer to: http://blog.csdn.net/Lone1yCode/article/details/79087495 )
Crazy Baidu found a very effective way, as shown in the following figure:
As shown in the figure above, on Android studio, click file, settings, build, execution, deployment, debugger and instant run, cancel the check and try to install again. It’s successful!!
The function of instant run is to speed up the construction and reconstruction. When running the program for the first time, the speed is the same as the normal speed. However, after making many modifications to the program, if you run the program again, Android studio will quickly complete the construction, which is much faster than running the program for the first time. You can learn more about Baidu by yourself.
In addition, I can only copy the project, and the running program will give this error prompt. If the edited project is not copied, it is recommended to start instant run.
Similar Posts:
- Session ‘app’: Error Launching activity
- Solution to the problem of design editor is unavailable until after a successful project sync in Android Studio development
- Android Run App Warning: The application could not be installed: INSTALL_FAILED_TEST_ONLY
- [Run the android emulator] emulator: ERROR: x86 emulation currently requires hardware acceleration!
- Error running app: Default Activity Not Found
- No JVM could be found on your system [How to Solve]
- How to Solve Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!
- [Solved] Android Studio Install Error: Unable to access Android SDK add on list
- [Solved] Android Studio Compile error: Android resource linking failed
- [Solved] Android ADB server didn’t ACK * failed to start daemon *