gpt4 book ai didi

android - FaSTLane beta lane 无法在 android Flutter 中创建应用构建

转载 作者:行者123 更新时间:2023-12-03 03:54:50 27 4
gpt4 key购买 nike

我无法使用 faSTLane 构建 beta 应用程序并且错误说-:

1.AAPT:错误:找不到资源android:attr/fontVariationSettings。
2.AAPT:错误:找不到资源android:attr/ttcIndex。

可以使用 Flutter app build 或使用原生 android studio 界面构建应用,但使用 faSTLane beta 命令失败。

我的车道是-

lane :beta do
gradle(task: 'assemble', build_type: 'Release')
upload_to_play_store(track: 'beta')
slack(message: 'Successfully distributed a new beta build')

结尾

app/builld.gradle 文件 -
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

android {
compileSdkVersion 28

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
applicationId "com.tudite.mobileapp"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
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
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics:17.2.3'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

最佳答案

在深入研究 faSTLane 文档后,以下解决方案对我有用-

1 - 将 gradle(task: 'assemble', build_type: 'Release') 更改为 gradle(task:
' bundle ',build_type:'发布')

更新的车道是 -

lane :beta do
gradle(task: 'bundle', build_type: 'Release')
supply(
skip_upload_changelogs: true,
skip_upload_screenshots: false,
skip_upload_images: false,
skip_upload_metadata: false
)
upload_to_play_store(
track: 'beta',
version_code: 2,
version_name: "1.0.1",
)
slack(message: 'Successfully distributed a new beta build')
end

关于android - FaSTLane beta lane 无法在 android Flutter 中创建应用构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61585990/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com