diff --git a/example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs b/example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs index 60ba7a275..817fcb4a5 100644 --- a/example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs +++ b/example/unity/DemoApp/Assets/FlutterUnityIntegration/Editor/Build.cs @@ -367,6 +367,21 @@ private static void ModifyAndroidGradle(bool isPlugin) var proguardText = File.ReadAllText(proguardFile); proguardText = proguardText.Replace("-ignorewarnings", "-keep class com.xraph.plugin.** { *; }\n-keep class com.unity3d.plugin.* { *; }\n-ignorewarnings"); File.WriteAllText(proguardFile, proguardText); + + // Make sure "game_view_content_description" is in strings.xml + var stringsFile = Path.Combine(APKPath, "launcher", "src", "main", "res", "values", "strings.xml"); + if(File.Exists(stringsFile)) + { + var stringsText = File.ReadAllText(stringsFile); + if(!stringsText.Contains("game_view_content_description")) + { + stringsText = stringsText.Replace("", "\n Game view"); + File.WriteAllText(stringsFile, stringsText); + } + } else + { + Debug.LogError("Android res/values/strings.xml file not found during export."); + } } private static void BuildIOS(String path, bool isReleaseBuild) diff --git a/unitypackages/README.md b/unitypackages/README.md index 7c98e1424..7e8351a51 100644 --- a/unitypackages/README.md +++ b/unitypackages/README.md @@ -33,7 +33,7 @@ Changes for `2022.1.7f1` and earlier were collected retroactively and might not ## Pending (master branch) > Example Unity project, not in a unitypackage yet. -* *No changes* +* (Android) Handle missing `"game_view_content_description"` string in Unity output strings.xml. ## 2022.3.0 >fuw-2022.3.0.unitypackage @@ -43,6 +43,7 @@ Changes for `2022.1.7f1` and earlier were collected retroactively and might not * (Web) Fix Javascript error on Play and Pause. * (Android) Fix build error `resource style/UnityThemeSelector not found` in the example project. * Use Il2CppCodeGeneration.OptimizeSpeed in Android and iOS release exports. +* (Android) Handle new .gradle.kts files in Flutter 3.29+. ## 2022.2.0