I’ve just uploaded a new version of app to play store and had a warning about 64 bit.
So have set about a long-winded process of updating Unity to provide 64 bit support.
As part of that I’ve updated Unity to latest 2018, updated Android Studio etc etc.
Now, when I build I get an error updating the android manifests.
The entry in the Unity editor log is:
Attribute application@icon value=(@drawable/app_icon) from AndroidManifest-main.xml:5:16-49
is also present at AndroidManifest.xml:13:9-45 value=(@drawable/ic_launcher).
Suggestion: add 'tools:replace="android:icon"' to <application> element at AndroidManifest-main.xml:5:3-17:17 to override.
I’ve found various hits on google, but I dont understand the whole android manifest setup, or even where the files are. I dont really want to go editing files off the back of google hits without knowing what I’m doing.
I’ve attached the full editor log. Can anyone point me in the right direction?
Thaks in advance.
4521682–418540–editor_copy.txt (964 KB)
I did try changing the following in AndroidManifest-main.xml :
<application android:icon=“@drawable/app_icon”
to
<application tools:replace=“android:icon”@drawable/app_icon"
But this seemed to get overwritten on the next build anyway.
OK, think I’ve worked this out now.
The AndroidManifest-main.xml file does get generated at build time.
Its actually the AndroidManifest files under Assets > Plugins > Resources that need amending.
<application android:icon=“@drawable/app_icon”
to
<application tools:replace=“android:icon”@drawable/app_icon"
and it seems to have built. Will check the APK later.
OK … something isn’t right.
Build standalone says Build completed with result of Succeeded.
But the APK is NOT generated.
Build and Run fails.
Mono.Xml2.XmlTextReader.ReadAttributes (Boolean isXmlDecl)
Mono.Xml2.XmlTextReader.ReadStartTag ()
Mono.Xml2.XmlTextReader.ReadContent ()
Mono.Xml2.XmlTextReader.ReadContent ()
Mono.Xml2.XmlTextReader.Read ()
System.Xml.XmlTextReader.Read ()
System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader)
System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader)
System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader)
UnityEditor.AndroidXmlDocument..ctor (System.String path)
UnityEditor.AndroidManifest..ctor (System.String path)
Which is the file I edited earlier
Any ideas if I’ve messed up the syntax above?
One other strange thing. When I give it the name/location of the APK to build, when it has finished building, it opens up explorer in the directory above that location rather than opening that location. No APK in there either way.