问题
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.
![](https://i0.wp.com/i.stack.imgur.com/RcNH5.png)
回答1:
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.
Edit: 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.
回答2:
I had similar issue after merging code and it turned out that there was an illegal value in AndroidManifest.xml
file. Removing the illegal value fixed the issue.
So, make sure to validate your file for errors.
来源:https://stackoverflow.com/questions/10995977/why-open-button-after-installing-apk-on-android-device-is-disabled