Проблема построения моего проекта флаттера с помощью Fastlane и Travis CI - PullRequest
0 голосов
/ 18 ноября 2018

У меня проблемы с созданием моего проекта Flutter с Fastlane и Travis Ci.Это по журналу сборки:

https://api.travis -ci.com / v3 / job / 159330691 / log.txt? Log.token = TsItdA2SM5zf0RDFlXZydg

Создание локальноне проблема.Кажется, я что-то упустил, чтобы установить ECT.Я борюсь с этим со вчерашнего дня, пожалуйста, помогите мне :).Есть более 30 ошибок, подобных этой:

/home/travis/build/HerrNiklasRaab/hapii2/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:5: error: package io.flutter.plugins.firebaseauth does not exist
    import io.flutter.plugins.firebaseauth.FirebaseAuthPlugin;

Я не знаю, как решить эту проблему.

Это мой travis.yml

matrix:
  include:
  - os: linux
    language: android
    licenses:
      - 'android-sdk-preview-license-.+'
      - 'android-sdk-license-.+'
      - 'google-gdk-license-.+'
    android:
      components:
        - tools
        - platform-tools
        - build-tools-28.0.3
        - android-27
        - extra-android-m2repository
        - extra-google-m2repository
        - extra-google-android-support
    install:
    - cd android
    - bundle install
    script:
    - echo "flutter.sdk=../../flutter/" >> local.properties
    - bundle exec fastlane beta
before_install:
- openssl aes-256-cbc -K $encrypted_94197833ced1_key -iv $encrypted_94197833ced1_iv
  -in secrets.tar.enc -out secrets.tar -d
- tar xvf secrets.tar
- gem install bundler
- git clone https://github.com/flutter/flutter.git -b beta --depth 1
- yes | sdkmanager "platforms;android-27"

Мой Fastfile:

# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:android)

platform :android do
  desc "Runs all the tests"
  lane :test do
    gradle(task: "test")
  end

  desc "Submit a new Beta Build to Crashlytics Beta"
  lane :beta do
    gradle(task: "clean assembleRelease")
    crashlytics

    # sh "your_script.sh"
    # You can also use other beta testing services here
  end

  desc "Deploy a new version to the Google Play"
  lane :deploy do
    gradle(task: "clean assembleRelease")
    upload_to_play_store
  end
end

lane :beta do
  # Adjust the `build_type` and `flavor` params as needed to build the right APK for your setup
  gradle(
    task: 'assemble',
    build_type: 'Release',
    properties: {
      "android.injected.signing.store.file" => "key.jks",
      "android.injected.signing.store.password" => "",#ENV["storePassword"],
      "android.injected.signing.key.alias" => "key",#ENV["keyAlias"],
      "android.injected.signing.key.password" => "", #ENV["keyPassword"],
    }
  )

  # upload_to_play_store(track: 'beta')

  # ...
end

И мой 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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 28

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.hapi.hapiapp"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    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.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.google.firebase:firebase-core:16.0.4'
    implementation 'com.google.firebase:firebase-analytics:16.0.4'
    implementation 'com.google.firebase:firebase-auth:16.0.4'
    implementation 'com.google.firebase:firebase-firestore:17.1.1'
    implementation 'com.google.firebase:firebase-functions:16.1.1'
    implementation 'com.google.firebase:firebase-messaging:17.3.3'
    implementation 'com.google.firebase:firebase-storage:16.0.3'
}
apply plugin: 'com.google.gms.google-services'
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...