2013-06-28 139 views
0

任何人在这里谁有2个Android项目的压倒一切的经验?如果我想安装第二个,我不能安装第一个,因为它会导致错误。我已经尝试创建一个新项目并复制第二个应用程序的源代码,但我遇到了同样的问题。还尝试用“-clean”命令清理我的工作区,但它没有帮助。谁知道解决方案?Android项目相互重叠

错误说我的第一个活动(这是我的启动画面)的包不退出。除非我还没有安装应用程序第一,因为那么一切工作正常...

在此先感谢。

@EDIT:

错误:

[2013-06-28 10:06:09 - KCStandaard] Starting activity com.android.standard.actSplash on device 1e0dc11e 
[2013-06-28 10:06:09 - KCStandaard] New package not yet registered with the system. Waiting 3 seconds before next attempt. 
[2013-06-28 10:06:12 - KCStandaard] Starting activity com.android.standard.actSplash on device 1e0dc11e 
[2013-06-28 10:06:13 - KCStandaard] New package not yet registered with the system. Waiting 3 seconds before next attempt. 
[2013-06-28 10:06:16 - KCStandaard] Starting activity com.android.standard.actSplash on device 1e0dc11e 
[2013-06-28 10:06:17 - KCStandaard] New package not yet registered with the system. Waiting 3 seconds before next attempt. 
[2013-06-28 10:06:20 - KCStandaard] Starting activity com.android.standard.actSplash on device 1e0dc11e 
[2013-06-28 10:06:20 - KCStandaard] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.koeriers.tools/com.android.standard.actSplash } 
[2013-06-28 10:06:20 - KCStandaard] New package not yet registered with the system. Waiting 3 seconds before next attempt. 
[2013-06-28 10:06:23 - KCStandaard] Starting activity com.android.standard.actSplash on device 1e0dc11e 
[2013-06-28 10:06:24 - KCStandaard] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.koeriers.tools/com.android.standard.actSplash } 
[2013-06-28 10:06:24 - KCStandaard] ActivityManager: Error type 3 
[2013-06-28 10:06:24 - KCStandaard] ActivityManager: Error: Activity class {com.koeriers.tools/com.android.standard.actSplash} does not exist. 

在已经安装了第一或第二的应用程序,我只收到此错误。我试图运行另一个。

+0

他们使用相同的包名吗? – Ostkontentitan

+0

你能否详细说明你的意思是“重写”?会发生什么,一步一步地发生,错误**究竟是什么**等等? –

+0

@Konstantin不,他们没有。第一个使用com.android.standard,第二个使用com.android.second。 – user

回答

1

重命名通过右击项目>的Android应用工具>重命名的应用程序包,希望这会为你工作。

+0

已经尝试过 – user

0

如果在第二个项目中包含第一个或其中的一部分等,那么安装它时很可能会遇到问题。如果情况并非如此,请在此处粘贴代码或提供链接,以便我们可以看到问题可能出在哪里。

+0

在这两个应用程序中确实存在一个包,该包在两个应用程序中都具有相同的名称。但是那个行为更像是一个图书馆,虽然它没有被标记或包含像一个图书馆。这会导致这样的问题吗? – user

+0

这两个项目中的包是否基本相同(例如相同的cksum)? – g00dy

+0

请同时指定两个应用程序的软件包名称。 – g00dy

3

不要使用com.android作为包名的一部分。

我再说一遍,不要使用com.android作为包名的一部分。这是系统软件包的名称,而不是您的软件包名称。

+0

我用两个应用程序替换了Android部件的例子。但问题仍然存在 – user

+0

是的,Eclipse对于重构软件包名称非常可怕。您必须重命名它们,然后您必须手动更正清单文件以及com.android出现的不是系统组成部分(无论是应用程序包名称还是活动包名称)的任何位置。您还必须重做所有导入,以便它们不提及android.R(即使那些android.R不以红色标出)。 –

+0

我终于成功解决了这个问题。虽然我不确定我应该标记为“接受”的答案。因为你和user2523388都给了我最终为我工作的解决方案。 – user