I have a library project which has the following structure :
<activity android:name="com.comp.package.activities.A1">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.comp.package.activities.A2">
</activity>
<activity android:name="com.comp.package.activities.A3">
</activity>
<activity android:name="com.comp.package.activities.A4">
</activity>
In the app project I want the merged manifest to be :
<activity android:name="com.comp.package.activities.A2">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="com.comp.package.activities.A1">
</activity>
<activity android:name="com.comp.package.activities.A3">
</activity>
<activity android:name="com.comp.package.activities.A4">
</activity>
Is it possible to achieve this using manifest merger feature?
If I try to have
<activity android:name="com.comp.package.activities.A2">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
in the base manifest file of the app project, I am getting the following error.
Trying to merge incompatible /manifest/application/activity[@name=com.comp.package.activities.A2] element:
<activity
@android:name="com.comp.package.activities.A2">
-- <intent-filter>
-- <action
-- @android:name="android.intent.action.MAIN">
<activity
@android:name="com.comp.package.activities.A2">
++</activity>
++(end reached)