From f9e3886087b6f6f9f084b2b66e481395f1f45c02 Mon Sep 17 00:00:00 2001 From: GeJiaXiang <353358601@qq.com> Date: Wed, 13 Mar 2024 16:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0=E8=AE=BAflavor=E6=98=AF=E4=BB=80?= =?UTF-8?q?=E4=B9=88=EF=BC=8Cdebug=E7=AD=BE=E5=90=8D=E9=83=BD=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E4=B8=BA=EF=BC=9A8B:38:27:69:4A:A0:F7:6B:5A:A6:4A:D0:?= =?UTF-8?q?14:92:81:64:AF:B1:F6:27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- star_lock/android/app/build.gradle | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/star_lock/android/app/build.gradle b/star_lock/android/app/build.gradle index 91a32b6c..de479b6e 100644 --- a/star_lock/android/app/build.gradle +++ b/star_lock/android/app/build.gradle @@ -29,6 +29,15 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { signingConfigs { + // 这里“debug”不是一个自定义变量,而是一个特定的关键词,凡是使用--debug模式,都会引用到这里 + // 目前看来,debug模式没办法在buildTypes里面按flavors指定编译签名,所有口味的debug模式只能用同一个签名 + debug { + storeFile file("starlock.keystore") + storePassword '123456' + keyAlias = 'starlock' + keyPassword '123456' + } + // 下面的pre、sky、xhj 都是自定义变量,自身不起任何作用,而是看哪里引用了它们 pre { storeFile file("starlock.keystore") storePassword '123456' @@ -143,12 +152,6 @@ android { 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 - } } }