From cbc2b8f63598d61f43b9c723523a7991dff27466 Mon Sep 17 00:00:00 2001 From: yanweidong Date: Tue, 4 Aug 2026 11:15:34 +0800 Subject: [PATCH] fix(user-app): restore release apk build --- .gitignore | 1 + apps/user_app/android/app/build.gradle.kts | 4 ++++ apps/user_app/android/app/src/main/AndroidManifest.xml | 3 ++- .../app/src/main/res/xml/network_security_config.xml | 7 +++++++ apps/user_app/android/gradle.properties | 7 +++++++ 5 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 apps/user_app/android/app/src/main/res/xml/network_security_config.xml diff --git a/.gitignore b/.gitignore index b43bb3a..18ca80a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ builds bin out output/ +**/outputs/ target release debug diff --git a/apps/user_app/android/app/build.gradle.kts b/apps/user_app/android/app/build.gradle.kts index 7471d63..7dd1dbe 100644 --- a/apps/user_app/android/app/build.gradle.kts +++ b/apps/user_app/android/app/build.gradle.kts @@ -30,6 +30,10 @@ android { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. signingConfig = signingConfigs.getByName("debug") + // tobias 5.3.4 ships legacy global consumer rules that currently + // crash AGP 9's R8 pass against androidx.core 1.17.0. + isMinifyEnabled = false + isShrinkResources = false } } } diff --git a/apps/user_app/android/app/src/main/AndroidManifest.xml b/apps/user_app/android/app/src/main/AndroidManifest.xml index ff95ab6..0e085c3 100644 --- a/apps/user_app/android/app/src/main/AndroidManifest.xml +++ b/apps/user_app/android/app/src/main/AndroidManifest.xml @@ -3,7 +3,8 @@ + android:icon="@mipmap/ic_launcher" + android:networkSecurityConfig="@xml/network_security_config"> + + + + rest.heqiapp.com + + diff --git a/apps/user_app/android/gradle.properties b/apps/user_app/android/gradle.properties index e96108c..a53ea8c 100644 --- a/apps/user_app/android/gradle.properties +++ b/apps/user_app/android/gradle.properties @@ -4,3 +4,10 @@ android.useAndroidX=true android.newDsl=false # This builtInKotlin flag was added by the Flutter template android.builtInKotlin=false +# Flutter plugins are resolved from the Pub cache on C:, while this project is +# stored on D:. Kotlin's incremental cache cannot relativize sources across +# Windows drive roots, so keep Android plugin compilation non-incremental. +kotlin.incremental=false +# tobias 5.3.4 still publishes legacy global consumer ProGuard options. AGP 9 +# offers this compatibility switch while the plugin migrates those rules. +android.r8.globalOptionsInConsumerRules.disallowed=false