Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
648 views
in Technique[技术] by (71.8m points)

installation - How to Fix Android App Not Installed Error?

I have developed the app by Android Studio, and build it to signed apk with V1 and V2.
It could install in my phone successfully.
But, when I uninstall the app, and install the app again, it would show App not installed.
But the apk file is the same apk file. Why first time can install, but not successful in second time?
Now, when I see this error, I would change the versionCode, then the app could install.
But beside this solution, have any solution on this problem?
Thank you so much!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I searched entire SO for the solution to this issue. Even disabling Google Play Protect didnt work. Creating APK with debuggable=false didnt work. I stumbled upon some answers which pointed me to a blog(link at the bottom)

What worked with me was

Goto Android Studio -> Build -> Build Bundle(s) / APK(s) -> Build APK(s)

However, I still dont seem to understand why a signed debug APK wont install on my device.

Couple more things to remember.

  1. You will see App Not Installed error even if you have old APK installed on the device and you are using Build APK(s) APK to install to update it. The package installer of Android is no more showing user friendly messages.
  2. If this method does not work, uninstall all variants of this APK from device and then try again.

More Info: https://commonsware.com/blog/2017/10/31/android-studio-3p0-flag-test-only.html


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...