【发布时间】:2020-08-09 16:10:22
【问题描述】:
在我将应用程序连接到 firebase 之前,该应用程序运行无误。在我连接到 Firebase 后出现此错误
它的 hello world 应用程序(默认示例应用程序)
AAPT2 aapt2-3.5.0-5435860-windows Daemon #2: Unexpected standard output: Ready
Running Gradle task 'assembleDebug'...
AAPT2 aapt2-3.5.0-5435860-windows Daemon #1: Unexpected standard output: Ready
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'...
* What went wrong:
Running Gradle task 'assembleDebug'...
Execution failed for task ':app:mergeDebugResources'.
Running Gradle task 'assembleDebug'...
> Multiple task action failures occurred:
Running Gradle task 'assembleDebug'...
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Running Gradle task 'assembleDebug'...
> AAPT2 aapt2-3.5.0-5435860-windows Daemon #0: Daemon startup failed
Running Gradle task 'assembleDebug'...
This should not happen under normal circumstances, please file an issue if it does.
Running Gradle task 'assembleDebug'...
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Running Gradle task 'assembleDebug'...
> AAPT2 aapt2-3.5.0-5435860-windows Daemon #1: Daemon startup failed
Running Gradle task 'assembleDebug'...
This should not happen under normal circumstances, please file an issue if it does.
Running Gradle task 'assembleDebug'...
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Running Gradle task 'assembleDebug'...
> AAPT2 aapt2-3.5.0-5435860-windows Daemon #2: Daemon startup failed
Running Gradle task 'assembleDebug'...
This should not happen under normal circumstances, please file an issue if it does.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'...
* Try:
Running Gradle task 'assembleDebug'...
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'...
* Get more help at https://help.gradle.org
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'...
BUILD FAILED in 16m 29s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 1030.9s (!)
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using
Jetfier to solve the incompatibility.
Building plugin cloud_firestore...
Exception: The plugin cloud_firestore could not be built due to the issue above.
Running Gradle task 'assembleAarRelease'...
build.gradle
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
-
build.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"
android {
compileSdkVersion 28
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.mobiboy"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
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 {
implementation 'androidx.multidex:multidex:2.0.1'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}
apply plugin: 'com.google.gms.google-services'
我该怎么做才能清除这个错误
我试过颤振清洁,颤振酒吧升级 添加到firebase后出现错误
【问题讨论】:
标签: android firebase flutter dart