From 9e999a316fc713ab9f72641b843f688551795d03 Mon Sep 17 00:00:00 2001
From: GeJiaXiang <353358601@qq.com>
Date: Wed, 6 Mar 2024 17:53:19 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=A3=E5=91=B3=F0=9F=98=8B:=20=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D=E9=AB=98=E5=BE=B7=E5=9C=B0=E5=9B=BErelease=E7=BC=96?=
=?UTF-8?q?=E8=AF=91=E4=BC=9A=E9=97=AA=E9=80=80=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
star_lock/android/app/build.gradle | 19 +++---
.../android/app/src/debug/AndroidManifest.xml | 8 ---
.../android/app/src/main/AndroidManifest.xml | 21 +++++++
.../app/src/profile/AndroidManifest.xml | 62 -------------------
star_lock/flavorizr.yaml | 4 ++
star_lock/pubspec.yaml | 2 +-
6 files changed, 35 insertions(+), 81 deletions(-)
delete mode 100644 star_lock/android/app/src/debug/AndroidManifest.xml
delete mode 100644 star_lock/android/app/src/profile/AndroidManifest.xml
diff --git a/star_lock/android/app/build.gradle b/star_lock/android/app/build.gradle
index a37f1154..b880ece9 100644
--- a/star_lock/android/app/build.gradle
+++ b/star_lock/android/app/build.gradle
@@ -56,11 +56,13 @@ android {
dev {
dimension "flavor-type"
applicationId "com.starlock.lock.dev"
+ signingConfig signingConfigs.pre
resValue "string", "app_name", "星锁-dev"
}
pre {
dimension "flavor-type"
applicationId "com.starlock.lock.pre"
+ signingConfig signingConfigs.pre
resValue "string", "app_name", "星锁"
}
sky {
@@ -104,18 +106,13 @@ android {
defaultConfig {
- applicationId "cn.starlock.lock"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
-// minSdkVersion flutter.minSdkVersion
-// targetSdkVersion flutter.targetSdkVersion
minSdkVersion 25
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
- signingConfig signingConfigs.sky
-
// 为减少体积,使用不同架构分包发布编译选项 flutter build apk --split-per-abi
// 所以需要禁用ndk在同一个个包中包含多个架构
// 但是禁用NDK配置,又无法使用flutter run 命令了,因为编译完成它按照名称匹配找不到.apk包
@@ -133,19 +130,21 @@ android {
universalApk true
}
}
- }// /Users/sky/app-starlock/star_lock/android/app/sky.jks
+ }
buildTypes {
release {
+ // 高德地图导致release编译模式下应用闪退,根据:[高德地图在Debug模式下运行正常但是打Release包时则闪退解决办法](https://blog.csdn.net/weixin_39370093/article/details/109631210)
+ // 为release模式设置混淆可以解决地图闪退问题
+ // 真实的解决办法
+ minifyEnabled false
+ shrinkResources false
productFlavors.dev.signingConfig signingConfigs.pre
productFlavors.pre.signingConfig signingConfigs.pre
productFlavors.sky.signingConfig signingConfigs.sky
productFlavors.xhj.signingConfig signingConfigs.xhj
}
debug {
- productFlavors.dev.signingConfig signingConfigs.pre
- productFlavors.pre.signingConfig signingConfigs.pre
- productFlavors.sky.signingConfig signingConfigs.sky
- productFlavors.xhj.signingConfig signingConfigs.xhj
+ signingConfig signingConfigs.pre
}
}
}
diff --git a/star_lock/android/app/src/debug/AndroidManifest.xml b/star_lock/android/app/src/debug/AndroidManifest.xml
deleted file mode 100644
index e38be3cb..00000000
--- a/star_lock/android/app/src/debug/AndroidManifest.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
diff --git a/star_lock/android/app/src/main/AndroidManifest.xml b/star_lock/android/app/src/main/AndroidManifest.xml
index de00346b..db10da2b 100644
--- a/star_lock/android/app/src/main/AndroidManifest.xml
+++ b/star_lock/android/app/src/main/AndroidManifest.xml
@@ -58,6 +58,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/star_lock/android/app/src/profile/AndroidManifest.xml b/star_lock/android/app/src/profile/AndroidManifest.xml
deleted file mode 100644
index 7b0b93a4..00000000
--- a/star_lock/android/app/src/profile/AndroidManifest.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/star_lock/flavorizr.yaml b/star_lock/flavorizr.yaml
index 9df16942..8515329a 100644
--- a/star_lock/flavorizr.yaml
+++ b/star_lock/flavorizr.yaml
@@ -57,6 +57,8 @@ flavors:
icon: "assets/icon/dev.png"
android:
applicationId: "com.starlock.lock.dev"
+ customConfig:
+ signingConfig: signingConfigs.pre
ios:
bundleId: "com.starlock.lock.dev"
pre:
@@ -65,6 +67,8 @@ flavors:
icon: "assets/icon/pre.png"
android:
applicationId: "com.starlock.lock.pre"
+ customConfig:
+ signingConfig: signingConfigs.pre
ios:
bundleId: "com.starlock.lock.pre"
sky:
diff --git a/star_lock/pubspec.yaml b/star_lock/pubspec.yaml
index ed8de82a..fe4dc2b9 100644
--- a/star_lock/pubspec.yaml
+++ b/star_lock/pubspec.yaml
@@ -18,7 +18,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
-version: 1.0.11+20240305
+version: 1.0.11+20240306
environment:
sdk: '>=2.12.0 <3.0.0'