修复 断点异常
This commit is contained in:
@@ -13,7 +13,6 @@ android {
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
@@ -36,13 +35,6 @@ 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")
|
||||
|
||||
// 启用代码混淆
|
||||
isMinifyEnabled = true
|
||||
// 启用资源压缩
|
||||
isShrinkResources = true
|
||||
// 指定 ProGuard 规则文件
|
||||
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -50,7 +42,3 @@ android {
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.0.4")
|
||||
}
|
||||
|
||||
29
android/app/proguard-rules.pro
vendored
29
android/app/proguard-rules.pro
vendored
@@ -1,29 +0,0 @@
|
||||
# Flutter ProGuard Rules
|
||||
# 2026-04-11 | ProGuard Rules | 解决 release 包白屏问题
|
||||
|
||||
# Flutter 引擎相关
|
||||
-keep class io.flutter.app.** { *; }
|
||||
-keep class io.flutter.plugin.** { *; }
|
||||
-keep class io.flutter.util.** { *; }
|
||||
-keep class io.flutter.view.** { *; }
|
||||
-keep class io.flutter.** { *; }
|
||||
-keep class io.flutter.plugins.** { *; }
|
||||
|
||||
# Flutter 嵌入相关
|
||||
-keep class io.flutter.embedding.** { *; }
|
||||
|
||||
# 保持 Flutter 生成的类
|
||||
-keep class androidx.lifecycle.** { *; }
|
||||
|
||||
# 保持反射调用的类
|
||||
-keepattributes *Annotation*
|
||||
-keepattributes Signature
|
||||
-keepattributes InnerClasses
|
||||
|
||||
# 保持泛型信息
|
||||
-keepclassmembers,allowobfuscation class * {
|
||||
@com.google.gson.annotations.SerializedName <fields>;
|
||||
}
|
||||
|
||||
# 避免 R8 完全模式问题
|
||||
-dontwarn io.flutter.embedding.**
|
||||
@@ -1,9 +1,12 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_CLIPBOARD" />
|
||||
|
||||
<application
|
||||
android:label="mom_kitchen"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:networkSecurityConfig="@xml/network_security_config">
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:exported="true"
|
||||
@@ -43,9 +46,4 @@
|
||||
<data android:mimeType="text/plain"/>
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<!-- Permissions for network, vibration, and clipboard access -->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.READ_CLIPBOARD_CONTENT" />
|
||||
</manifest>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
2026-04-11 | 网络安全配置 | 允许 HTTP 明文流量
|
||||
解决 Android 9+ 默认禁止 HTTP 流量导致的白屏问题
|
||||
-->
|
||||
<network-security-config>
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">eat.wktyl.com</domain>
|
||||
</domain-config>
|
||||
</network-security-config>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user