app won't install after package rename

我与影子孤独终老i 提交于 2020-02-03 08:02:31

问题


In order to easily test some features I created a stripped down copy of my app. Unfortunately neither of the applications seem to run any more. I have changed the package name for one of them to avoid one overwriting the other and the manifests both display the correct package for their respective projects.

Here is the error in the console window ->

[2011-12-24 11:37:44 - AGOS - LevelTest] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=package.package.package/.MyLaunchActivity }
[2011-12-24 11:37:44 - AGOS - LevelTest] ActivityManager: Error type 3
[2011-12-24 11:37:44 - AGOS - LevelTest] ActivityManager: Error: Activity class {package.package.package/package.package.package.MyLaunchActivity} does not exist.

Does anybody know what I've forgotten to configure?

EDIT:

I found that the manifest from the newer of the two copies had a problem. During the renaming the refractor must have changed the android:name attribute from MyLaunchActivity to package.package.package.MyLaunchActivtiy the older one is still faulty though.


回答1:


Got it. Turns out that the eclipse refractor renamed the android:name attribute in the manifest to contain the package name aswell as the launch activity. Not sure why the older version wasn't installing but it seems to be fine now ^^




回答2:


Most likely, you just need to remove the original package from the device/emulator.

I've had the same problem in the past and removing my 'working' app from the emulator allowed for the renamed app to install and run properly.

Edit: more info on how to remove a package: http://androidcommunity.com/forums/f4/how-to-uninstall-delete-an-application-from-the-emulator-126/ or go to Settings -> Applications -> Manage applications and you can uninstall it from there.



来源:https://stackoverflow.com/questions/8624324/app-wont-install-after-package-rename

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