我无法在Google Play上上传apk。 我尽一切努力。我无聊.... 我为这个问题工作了大约4天。 我尝试这种解决方案。
1-) 在android项目上添加key.properties
storePassword=pass
keyPassword=pass
keyAlias=xxxx
storeFile=xxxx.jks
在build.grandle上添加此行
defaultConfig{
ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
println "Signing with key.properties"
} else {
signingConfig signingConfigs.debug
println "Signing with debug keys"
}
}
}
然后我尝试从android studio获取apk。然后,我将捆绑包上传到游戏商店后,出现了一些错误。 2-) 在build.grandle
上添加此行splits {
abi {
enable true
reset()
include "armeabi-v7a", "arm64-v8a"
universalApk false
}
}
它也不起作用。
3-)我从bash脚本的flutter CLI中获得了捆绑包
flutter build appbundle --release --target-platform=android-arm64
它再次不起作用。
4-)我从bash脚本的flutter CLI中获得了捆绑包
flutter build apk --split-per-abi
它再次不起作用。
Flutter-版本结果为;
Flutter 1.7.8+hotfix.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 20e59316b8 (5 weeks ago) • 2019-07-18 20:04:33 -0700
Engine • revision fee001c93f
Tools • Dart 2.4.0
Google Play商店错误为
此版本不符合Google Play 64位要求
答案 0 :(得分:0)
defaultConfig {
applicationId "net.example.test"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
这是我的配置,我只是使用flutter build appbundle
来构建项目。另外,从pubspec.yaml发布时,请不要忘记项目的更改版本。