本文介绍了为什么“开放"?在 android 设备上安装 apk 后按钮被禁用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个项目,我想将它们组合在一起.当我分别在 设备 上安装它们时,打开"按钮(在已表示的页面中)成功安装后)启用.但是当我组合它们时,打开"按钮将被禁用,虽然安装过程将成功完成.我猜这个错误是因为ma​​nifest文件,但我是不确定.谢谢您的时间.

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.

这篇关于为什么“开放"?在 android 设备上安装 apk 后按钮被禁用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 11:17