protected static void GenerateAndroidManifest(string targetPath, string stagingArea, string packageName, bool debugAttr = true) { AndroidManifest manifest = new AndroidManifest(Path.Combine(stagingArea, "AndroidManifest.xml")); foreach (string str in UnityActivities) { manifest.RenameActivity(DefaultUnityPackage + "." + str, packageName + "." + str); } if (!debugAttr) { manifest.RemoveApplicationFlag("debuggable"); } manifest.SaveAs(Path.Combine(targetPath, "AndroidManifest.xml")); }