一、安卓方面
- ?打包后apk打開時(shí)閃屏關(guān)閉
-
android { buildTypes { release { // Enables code shrinking, obfuscation, and optimization for only // your project's release build type. minifyEnabled false // Enables resource shrinking, which is performed by the // Android Gradle plugin. shrinkResources false } } ... }
-
- 配置簽名文件
? ? ? ? ?key.properties? ?放在項(xiàng)目的android目錄下面。demo.jks放在項(xiàng)目的android/app/key的目錄下面,key目錄自己手動(dòng)創(chuàng)建。
storePassword=android1223
keyPassword=1234
keyAlias=demo
storeFile=key/demo.jks
? ? ? ? ?項(xiàng)目的android下的app目錄里的build.gradle增加以下配置? ? ? ? ? ??
def keystorePropertiesFile = rootProject.file("key.properties")
def keystoreProperties = new Properties()
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
//關(guān)閉混淆
minifyEnabled false //刪除無用代碼
shrinkResources false //刪除無用資源
}
}
二、IOS方面
- app的icon的原因上傳時(shí)報(bào)錯(cuò)。
? ? ? ? ? 原因:1024*1024的icon 不能帶有透明度。其它的icon可以做成圓角
? ? ?2. 在app store connect中填寫聯(lián)系信息中聯(lián)系方式的電話號(hào)碼時(shí),輸入11位手機(jī)號(hào)碼格式錯(cuò)誤
? ? ? ? ? 原因:格式確實(shí)有問題,正常格式為:+86-xxxxxxxxxxx? 如:+86-010-33339999
? ? ?3. 版本號(hào)使用統(tǒng)一的配置文件里的方式文章來源:http://www.zghlxwxcb.cn/news/detail-531045.html
? ? ? ? ?方法:需要在項(xiàng)目的ios目錄下,使用 flutter build ios --build-name=1.0.2? 打包或者再使用xcode打包,版本號(hào)就是配置文件里的。文章來源地址http://www.zghlxwxcb.cn/news/detail-531045.html
到了這里,關(guān)于Flutter 打包發(fā)版常見問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!