包重命名后应用程序将无法安装
为了轻松测试某些功能,我创建了应用程序的精简副本。不幸的是,这两个应用程序似乎都不再运行了。我更改了其中一个的包名称,以避免一个覆盖另一个,并且清单都显示了各自项目的正确包。
这是控制台窗口中的错误 ->
[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.
有人知道我忘记配置什么吗?
编辑:
我发现两个副本中较新副本的清单有问题。在重命名期间,折射器必须将 android:name
属性从 MyLaunchActivity
更改为 package.package.package.MyLaunchActivtiy
旧属性仍然有问题尽管。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
知道了。事实证明,Eclipse refractor 重命名了清单中的
android:name
属性,以包含包名称以及启动活动。不知道为什么旧版本没有安装,但现在似乎没问题^^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 ^^最有可能的是,您只需要从设备/模拟器中删除原始包即可。
我过去也遇到过同样的问题,从模拟器中删除我的“工作”应用程序可以让重命名的应用程序正常安装和运行。
编辑:有关如何删除包的更多信息:
http://androidcommunity。 com/forums/f4/how-to-uninstall-delete-an-application-from-the-emulator-126/
或者
转到设置 ->应用->管理应用程序,您可以从那里卸载它。
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.