You are modifying the wrong AndroidManifest
file. That AndroidManifest
from <ProjectName>TempStagingArea
you are modifying is generated by unity each time you build your project.
To use a custom AndroidManifest
file, you have to put your custom AndroidManifest
file at <ProjectName>AssetsPluginsAndroid
.
1.Go to <UnityInstallationDirecory>EditorDataPlaybackEnginesAndroidPlayerApk
, Copy the AndroidManifest.xml
file to your <ProjectName>AssetsPluginsAndroid
2.Open the copied Manifest file from <ProjectName>AssetsPluginsAndroid
and add your manifest.
In your particular case, add <application android:theme="Theme.Light.NoTitleBar" android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">
to it. Save, Build and Run.
Unity will now use that AndroidManifest
file. If you get crash or any other problem, then Unity does not want you to change that.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…