I run the application in the emulator it works successfully and the icon of the application is show in the emulator menu but when i try to run again that app from the emulator menu it can’t allow me to run from that and display the Toast “Application is Not installed in your phone”.
In the Image the red rounded is my application icon.
This can happen if you have your
MainActivity declared twice in your AndroidManifest.xml,
first as a launhcer
<activity android:name=".MyActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
and then just declared like:
<activity android:name=".MyActivity" />
So check for this and delete the second extra declaration.
Also, it happened to me once when I changed the launch activity. Reinstalling the application and restarting the phone make it work.
I had the same error when there was a syntax error in my widget provider. Instead of
perhaps this can be helpfull for those few who still experience the error
Remove the Repeat Main Activity Declaration in the manifest file. It work For me
Another scenario when you can receive such a message, if you have created the shortcut for an earlier version, and then moved the launcher activity into another package in the new version. (application package remained the same).
On my ZTE Blade, the shortcut is just removed during update.
On an HTC Nexus One the shortcut stays there, but clicking on it has no effect..
Its funny but i have solved my issue by remove permission from activity tag
i have code like below:
<application android:allowBackup="true" android:debuggable="false" android:icon="@drawable/app_icon" android:permission="android.permission.ACCESS_FINE_LOCATION" android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light.DarkActionBar" >
i have remove permission
<application android:allowBackup="true" android:debuggable="false" android:icon="@drawable/app_icon" android:label="@string/app_name" android:theme="@style/Theme.Sherlock.Light.DarkActionBar" >
I had this happen for including WRITE_EXTERNAL_STORAGE twice in the manifest. It only affected certain user phones, my test phones and the emulator launched fine, and lint gave no warning. I suffered quite a few 1 star ratings over several months before discovering the cause:
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> ... <application android:permission="android.permission.WRITE_EXTERNAL_STORAGE"...
Deleting the second one fixed it.