Heena Aggarwal
Heena Aggarwal

Reputation: 1

Unity: Unabe to merge Android Manifests

I am trying to make Android game using Unity. where I m using two modules which will use Plugin/Android feature 1. sqlite.so 2. SimpleNotification.aar It's giving me error :

\Temp\StagingArea\AndroidManifest-main.xml:4:58-89 Error: Attribute application@icon value=(@mipmap/app_icon) from AndroidManifest-main.xml:4:58-89 is also present at AndroidManifest.xml:10:3-36 value=(@drawable/app_icon). Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest-main.xml:4:3-12:17 to override.

After searching net for many hours, tried many things: 1. tools:replace="android:icon” in 2. xmlns:tools=http://schemas.android.com/tools in 3. targetSdkVersion set in player Settings

enter image description here But I have few queries like 1. How to know min/target Android API level for my libraries like .aar file or .so file which I m using 2. I have no Android Manifest file in my Plugin/Android folder. Manifest file is generated in Temp/Staging Area [as can be sessn in error]

Even I copied AndroidManifest file from Temp to Plugin/Android folder and does above changes like tools:replace="android:icon” but still getting same error.

Upvotes: 0

Views: 1770

Answers (1)

Cambesa
Cambesa

Reputation: 456

The error says that the icon is present in both manifest xml's, what if you remove it from one?

1: Often the libraries contain a manifest which shows the minimum required Android API level, choose the largest of them.

2: Try to move it from the temp folder to the Plugins/Android and remove the line where it mentions "android:icon". Actually make sure the icon is set only in one place, not sure which method is the best to set. Perhaps because it is set by unity, you don't need to set it by hand in the manifest anymore.

In my case I'm using this to set the app icon:

<application
  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
  android:icon="@drawable/app_icon"
      android:label="@string/app_name"
      android:debuggable="true">
....
</application>

If you copy this, does it work for you?

Upvotes: 0

Related Questions