Tuesday, November 20, 2012

Application Not installed in your phone

When we are running Android application, some times we are getting error like "Application Not installed in your phone" right ?

Details of error -

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".

Solution - 


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.