简体   繁体   English

包重命名后,app将无法安装

[英]app won't install after package rename

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. 在重命名期间,折射器必须将android:name属性从MyLaunchActivitypackage.package.package.MyLaunchActivtiy但较旧的仍然有问题。

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. 事实证明,eclipse refractor在清单中重命名了android:name属性,以包含包名称以及启动活动。 Not sure why the older version wasn't installing but it seems to be fine now ^^ 不知道为什么旧版本没有安装,但它现在似乎很好^^

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. 编辑:有关如何删除包的更多信息: http//androidcommunity.com/forums/f4/how-to-uninstall-delete-an-application-from-the-emulator-126/或转到设置 - >应用程序 - >管理应用程序,您可以从那里卸载它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM