Android Studio builds two applications for the same project simultaenously

本小妞迷上赌 提交于 2019-12-06 00:30:57

Maybe this will be helpful for others.

Gradle is doing manifest merge for library projects as well. So issue was to keep AndroidManifes.xml unchanged from library. It had application node for demo purposes and this node was successfully merged to main AndroidManifest.xml.

I'm going to submit issue to Google since I think it should prevent or warn about such situation.

Eugen Martynov answer is correct but i decided to reiterate what he said in layman's terms.

Go through your libraries and check their AndroidManifest.xml. One of them should have an <application> tag in it. Remove the tag and the double app problem will be solved.

Kita

The specific element in the ApplicationManifest.xml, that affects creating multiple launcher icons is the <intent-filter> containing <category android:name="android.intent.category.LAUNCHER"/>. Removing this <intent-filter> will give you control over the number of launcher icons. You can read a bit more elaborate SO answer here.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!