After I remove the apk, whenever I start Debug it tells me the package is not installed

旧街凉风 提交于 2019-12-10 04:13:37

问题


I have my Emulator open, and using Command Prompt I remove my application. I didn't closed the Emulator.

Then I go to Eclipse and hit Debug, but doesn't deploy the apk to the emulator, just tells me the package not yet registered with the system.

New package not yet registered with the system. Waiting 3 seconds before next attempt.

Restarting the emulator is not an option, as that takes 10-15 minutes.

What I am doing wrong?


回答1:


I have encountered this occasionally. Doing a clean project before rebuilding and redeploying seems to do the trick.




回答2:


This is eclipse (the point is eclipse can not run your app because can not start the right intent because can not find the right package) and one of the workaround of this is to rename your package in the manifest for example rename

package="com.hernblog.GreenThumbs" 

to

package="com.hernblog.GreenThumbs1"

compile and build this, then put it back to the name you wanted

package="com.hernblog.GreenThumbs"

works as a charm :)




回答3:


Clean and re-build may not help. So, in that case remove the app from your device. Then re-run your project on your device. That will help.




回答4:


After trying many different solutions for this problem, I found that the line

<application android:debuggable="true" />

in my AndroidManifest was causing this problem.

Removing this line fixed it for me.

Note: You can still build with debugging mode without this line by using the ndk-build option NDK_DEBUG=1




回答5:



im also having same problem.
I just commit my src,res folder in svn.
Then i check out new project from svn then it will works correctly.




回答6:


Also check your "Enabled" option in manifest! Mine turned to off, somehow ..




回答7:


I have also had this problem.

For me it was the fact that my launcher activity (the one with the Launch intent) did not have the "android:label" attribute WRONG!!!

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name">
    <activity
        android:name=".ui.SplashScreenActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".ui.DashboardActivity"
        android:label="@string/app_name">
    </activity>
    <activity android:name=".ui.LogListActivity"></activity>
</application>

RIGHT - Note the SplashScreenActivity

<application
    android:icon="@drawable/icon"
    android:label="@string/app_name">
    <activity
        android:name=".ui.SplashScreenActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".ui.DashboardActivity"
        android:label="@string/app_name">
    </activity>
    <activity android:name=".ui.LogListActivity"></activity>
</application>


来源:https://stackoverflow.com/questions/2340980/after-i-remove-the-apk-whenever-i-start-debug-it-tells-me-the-package-is-not-in

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