So I Created A manifest file in Assets/Plugin/Android/. The File contains:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<activity android:name="com.unity3d.player.UnityPlayerActivity" android:windowSoftInputMode="stateHidden"></activity>
</manifest>
Error Occurs when building:
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.AndroidManifest.SetApplicationFlag (System.String name, Boolean value)
UnityEditor.AndroidManifest.SetDebuggable (Boolean debuggable)
I followed the docs from here, about Overriding the Android Manifest.
The apk builds fine when the manifest is removed.
Complete Error:
NullReferenceException: Object reference not set to an instance of an object UnityEditor.AndroidManifest.SetApplicationFlag (System.String name, Boolean value) UnityEditor.AndroidManifest.SetDebuggable (Boolean debuggable) UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.PatchManifest (UnityEditor.Android.PostProcessor.PostProcessorContext context, System.String manifest) UnityEditor.Android.PostProcessor.Tasks.GenerateManifest.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:286) UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
UNITY 2018.3.4f1