在添加完毕wallpaper.jsk之后,再在工程中配置签名信息;

jsk生成方式,通过keytool命令,执行keytool -genkey -v -keystore wallpaper.jks -alias wallpaper -keyalg RSA -keysize 2048 -validity 36500,其中wallpaper.jks 与后面的wallpaper名称只要保持一致即可(可以取任意名称),其他部分不需要更改:
/Applications/Android\ Studio.app/Contents/jbr/Contents/Home/bin/keytool -genkey -v -keystore wallpaper.jks -alias wallpaper -keyalg RSA -keysize 2048 -validity 36500
This commit is contained in:
bluesea 2024-05-17 09:51:27 +08:00
parent 838adcd208
commit 249de9e0c9

View File

@ -22,8 +22,12 @@ if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
android {
namespace "com.lux.wallpapertoday"
namespace "com.example.wallpaper"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
@ -42,7 +46,7 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.wallpaper"
applicationId "com.lux.wallpapertoday"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion flutter.minSdkVersion
@ -51,11 +55,27 @@ android {
versionName flutterVersionName
}
buildTypes {
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
debug {
signingConfig signingConfigs.release
}
release {
ndk{
abiFilters "armeabi", "armeabi-v7a", "arm64-v8a"
}
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
}
}
}