为什么"开放"安装Android设备上的apk后,按钮被禁用?

问题描述:

我有两个项目,我想将它们合并together.When我在设备上,分别安装他们每个人的打开按钮(在页面已被重新安装成功后psented)$ p $是enabled.But当我将它们合并,打开按钮将被禁用,但安装过程中会完成successful.I猜测,这个错误是因为清单文件,但我不sure.Thanks你问候你的时间。结果

I have two projects and I want to combine them together.When I install each of them separately on device ,"Open" button (in page that has been represented after successful installation) is enabled.But when I combine them,"Open" button will be disabled, although installation process will be completed successful.I guess that this error is because of manifest file,but I am not sure.Thanks you in regards your time.

我不能肯定地说,没有看到你的表现,但我的猜测是,当你结合这两个项目中,结束了两个活动,每个包括

I can't say for certain without seeing your manifest, but my guess is that when you combined the two projects, you ended up with two activities that each included:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />`
    <category android:name="android.intent.category.LAUNCHER" />`
</intent-filter>

如果您务必只能说你想用打开按钮,打开活动,我想它会工作。

If you make sure to only say that in the activity you want to open with the "Open" button, I imagine it will work.

编辑:需要明确的是,它的罚款,有多个入口这样,但它似乎仍然有可能解释说,打开按钮被禁用,因为它是含糊不清是什么应该做的。

To be clear, it's fine to have multiple entry points like this, but it still seems likely to explain that "Open" button being disabled, since it's ambiguous what it should do.