Бета-полосе Fastlane не удается создать сборку приложения в android флаттер - PullRequest
1 голос
/ 04 мая 2020

Я не могу создать бета-приложение, используя fastlane и ошибку, скажем -:

1.AAPT: ошибка: ресурс android: attr / fontVariationSettings не найден. 2.AAPT: ошибка: ресурс android: attr / ttcIndex не найден.

Приложение может быть построено с помощью сборки приложения flutter или с использованием собственного интерфейса android studio, но завершается неудачно с помощью бета-команды fastlane.

Моя полоса движения -

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

end

app / builld.gradle file -

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'
}

1 Ответ

0 голосов
/ 05 мая 2020

После изучения документации fastlane у меня сработало следующее решение:

1 - изменить gradle (задача: «сборка», build_type: «Release») на gradle (задача: «комплект», 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
...