'App not Installed' Error on Android

2018-12-31 12:04发布

I have a program working in the Android Emulator. Every now and again I have been creating a signed .apk and exporting it to my HTC Desire to test. It has all been fine.

On my latest exported .apk I get the error message 'App not installed' when I try to install the .apk. It runs fine on the emulators.

As I have mainly been testing on the emulators and only every now and again exporting to a real phone I am not sure when this happened. What is the likely cause of it not installing on a physical phone but running fine in the emulators?

I have tried rebooting the phone & removing the existing .apk, does not fix the fault.

30条回答
忆尘夕之涩
2楼-- · 2018-12-31 12:34

I also encountered this issue. Kindly try this solution. Make sure that the package name of your project is different from your previous project that was already installed in your mobile phone. I think they get conflict in their names. It works in me.

查看更多
像晚风撩人
3楼-- · 2018-12-31 12:35

I had the same problem. I did not realise that an app must be signed even for testing.

After self signing it, it installed fine.

查看更多
泛滥B
4楼-- · 2018-12-31 12:36

I have also solved this issue,

The problem was that i declared my main activity twice, On as the first activity to load and i specified also an intent-filter for it And once again below it i declared it again .

Just make sure you don't declare your activities twice .

查看更多
看风景的人
5楼-- · 2018-12-31 12:37

If application's not installing, delete the file .android_secure/smdl2tmpl.asec from the SD card.

If the folder .android_secure is empty in the file manager, delete it from the PC.

查看更多
梦醉为红颜
6楼-- · 2018-12-31 12:37

create keystore file through command line

keytool -genkey -alias key_file_name.keystore -keyalg RSA -validity 1000000000000000 -keystore key_file_name.keystore

export apk through Eclipse, right click on Android project Android Tools > Export Signed Application Package, then give keystore location & password.

this will crate signed apk at the same time apk will be zipaligned. And installable.

If you go through command line for all, some times you may face "Application not installed" error. (Application not installed error can happen not only, when using command line. It can be some other reasons as well)

查看更多
不流泪的眼
7楼-- · 2018-12-31 12:38

I faced with the same problem. The problem was the main activity in my AndroidManifest.xml file was written twice. I deleted the duplicate.

查看更多
登录 后发表回答