Application Not installed in your phone

吃可爱长大的小学妹 提交于 2019-12-22 04:28:28

问题


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.


回答1:


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.




回答2:


Also, it happened to me once when I changed the launch activity. Reinstalling the application and restarting the phone make it work.




回答3:


I had the same error when there was a syntax error in my widget provider. Instead of

android:configure="com.android.worldagendaapp1.WidgetConfig"

I wrote

android:configure="com.android.WorldAgendaapp1.WidgetConfig"

perhaps this can be helpfull for those few who still experience the error




回答4:


Remove the Repeat Main Activity Declaration in the manifest file. It work For me




回答5:


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

Further details here




回答6:


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



回答7:


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.



来源:https://stackoverflow.com/questions/8698410/application-not-installed-in-your-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!