SAF测试阶段,验证中
This commit is contained in:
@@ -6,7 +6,7 @@ plugins {
|
||||
|
||||
android {
|
||||
namespace = "com.lxh.battery_health"
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
compileSdk = 34
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
compileOptions {
|
||||
@@ -21,38 +21,39 @@ android {
|
||||
defaultConfig {
|
||||
applicationId = "com.lxh.battery_health"
|
||||
minSdk = flutter.minSdkVersion
|
||||
targetSdk = flutter.targetSdkVersion
|
||||
targetSdk = 34
|
||||
versionCode = flutter.versionCode
|
||||
versionName = flutter.versionName
|
||||
multiDexEnabled = true
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
// 这里配置你正式发布的签名
|
||||
// 如果还没有正式签名,debug 可以用 debug 签名替代
|
||||
keyAlias = "your_key_alias"
|
||||
keyPassword = "your_key_password"
|
||||
storeFile = file("your_keystore.jks")
|
||||
storePassword = "your_store_password"
|
||||
// 如果没有正式签名,可以用 debug 签名代替(测试用)
|
||||
// 正式发布时请替换为自己的密钥
|
||||
getByName("debug") {
|
||||
// debug 签名已经存在,无需额外配置
|
||||
}
|
||||
create("release") {
|
||||
// 如果有正式签名,在这里配置
|
||||
// keyAlias = "..."
|
||||
// keyPassword = "..."
|
||||
// storeFile = file("...")
|
||||
// storePassword = "..."
|
||||
}
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
// 如果没有正式签名,可以暂时用 debug 签名
|
||||
// 正式发布时再替换
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
// 🟢 关键:debug 版本包名加 .dev 后缀
|
||||
applicationIdSuffix = ".dev"
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
isDebuggable = true
|
||||
isMinifyEnabled = false
|
||||
isShrinkResources = false
|
||||
}
|
||||
|
||||
release {
|
||||
applicationIdSuffix = "" // 保持原包名
|
||||
// 🟢 如果还没有正式签名,先用 debug 签名替代
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
// release 版本不加后缀,保持原包名
|
||||
signingConfig = signingConfigs.getByName("debug") // 若没有正式签名,先用 debug 签名
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
@@ -61,16 +62,12 @@ android {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// 如果有 productFlavors,可以在这里配置
|
||||
// 如果没有,忽略即可
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source = "../.."
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// 如果项目中有其他依赖,添加在这里
|
||||
// 注意:sqflite、permission_handler 等 Flutter 插件会自动包含
|
||||
}
|
||||
// 无需额外添加 Activity KTX,因为已改用 startActivityForResult
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user