- Home /
How do I use a custom Android Manifest?
Here is the Android Manifest I'd like to use: http://pastebin.com/1dkz24rh
I've written it based on the specs for publishing to the Nvidia Shield: http://tinyurl.com/h3bsxsg
I created a new folder: Plugins / Android, and put it in there:
The result is that the game crashes and quits immediately when I install and run it on the machine. I've never built for Android before, so maybe my Android Manifest is written incorrectly? Maybe I'm supposed to provide more things in the Android folder? I just have no idea.
Can you please post the logcat log from your crash? It will help in understanding what went wrong.
Answer by hexagonius · Dec 02, 2016 at 03:33 PM
It might just not be the best place for your custom Manifest file. According to the docs here:
AndroidManifest.xml file ... placed in the Assets->Plugins->Android folder (placing a custom manifest completely overrides the default Unity Android manifest).
while another passage says:
You can drop pre-compiled Android library projects into the Assets->Plugins->Android folder. Pre-compiled means all .java files must have been compiled into jar files located in either the bin/ or the libs/ folder of the project. AndroidManifest.xml from these folders will get automatically merged with the main manifest file when the project is built.
so my conclusion is putting your manifest in any other folder than Plugins/Android will merge it into the existing default one
Answer by NextTime · Jul 28, 2017 at 10:54 AM
When you switch platform and selected Android platform, unity generated AndroidManifest.xml file, you need open this file and edit your android:targetSdkVersion="write your version" Example android:targetSdkVersion="24"/>