构建失败。但是只有cloud_firestore警告

时间:2019-10-11 15:36:54

标签: android flutter google-cloud-firestore androidx flutter-dependencies

尝试构建apk,然后失败。但只有警告。如何开始调试?

    [I] ➜ flutter build appbundle -v
    [  +26 ms] executing: [/home/tknv/src/flutter/] git log -n 1 --pretty=format:%H
    [  +48 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
    [        ] cc949a8e8b9cf394b9290a8e80f87af3e207dce5
    ...
    [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [  +80 ms] Found plugin cloud_firestore at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+5/
    [   +6 ms] Found plugin firebase_core at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/
    [  +25 ms] Found plugin geoflutterfire at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/geoflutterfire-2.0.3+5/
    [   +2 ms] Found plugin geolocator at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.1.4+1/
    [   +2 ms] Found plugin google_api_availability at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/google_api_availability-2.0.1/
    [   +2 ms] Found plugin location_permissions at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-2.0.3/
    [   +4 ms] Found plugin path_provider at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/
    [  +15 ms] Found plugin workmanager at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/workmanager-0.1.2/
    [  +31 ms] Found plugin cloud_firestore at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.12.9+5/
    [   +2 ms] Found plugin firebase_core at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.4.0+9/
    [   +7 ms] Found plugin geoflutterfire at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/geoflutterfire-2.0.3+5/
    [   +1 ms] Found plugin geolocator at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/geolocator-5.1.4+1/
    [   +1 ms] Found plugin google_api_availability at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/google_api_availability-2.0.1/
    [   +1 ms] Found plugin location_permissions at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/location_permissions-2.0.3/
    [   +3 ms] Found plugin path_provider at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-1.3.0/
    [  +11 ms] Found plugin workmanager at
    /home/tknv/src/flutter/.pub-cache/hosted/pub.dartlang.org/workmanager-0.1.2/
    [  +51 ms] Initializing gradle...
    [  +16 ms] Using gradle from /home/tknv/src/mana/mana/android/gradlew.
    [  +68 ms] executing: /home/tknv/src/mana/mana/android/gradlew -v
    [ +417 ms] 
               ------------------------------------------------------------
               Gradle 5.4.1
               ------------------------------------------------------------

               Build time:   2019-04-26 08:14:42 UTC
               Revision:     261d171646b36a6a28d5a19a69676cd098a4c19d

               Kotlin:       1.3.21
               Groovy:       2.5.4
               Ant:          Apache Ant(TM) version 1.9.13 compiled on July 10 2018
               JVM:          1.8.0_202-release (JetBrains s.r.o 25.202-b49-5587405)
               OS:           Linux 5.0.0-31-generic amd64
    [   +7 ms] Initializing gradle... (completed in 0.5s)
    [  +11 ms] Resolving dependencies...
    [        ] executing: [/home/tknv/src/mana/mana/android/]
    /home/tknv/src/mana/mana/android/gradlew app:properties
   ...
    [   +1 ms] Running Gradle task 'bundleRelease'...
    [   +3 ms] executing: [/home/tknv/src/mana/mana/android/]
    /home/tknv/src/mana/mana/android/gradlew -Pverbose=true -Ptarget=lib/main.dart
    -Ptrack-widget-creation=false -Ptarget-platform=android-arm,android-arm64 bundleRelease
    [ +651 ms] > Configure project :app
    [        ] WARNING: API 'variant.getMergeAssets()' is obsolete and has been replaced with
    'variant.getMergeAssetsProvider()'.
    [        ] It will be removed at the end of 2019.
    [        ] For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
    [        ] To determine what is calling variant.getMergeAssets(), use
    -Pandroid.debug.obsoleteApi=true on the command line to display more information.
    [        ] WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced
    with 'variantOutput.getProcessResourcesProvider()'.
    [        ] It will be removed at the end of 2019.
    [        ] For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
    [        ] To determine what is calling variantOutput.getProcessResources(), use
    -Pandroid.debug.obsoleteApi=true on the command line to display more information.
    [ +174 ms]          *********************************************************
    [        ] WARNING: This version of cloud_firestore will break your Android build if it or its
    dependencies aren't compatible with AndroidX.
    [        ]          See xxx for more information on the problem and how to fix
    it.
    [        ]          This warning prints for all Android build failures. The real root cause of
    the error may be unrelated.
    [        ]          *********************************************************
    [ +327 ms] Running Gradle task 'bundleRelease'... (completed in 1.2s)
    [   +2 ms] "flutter appbundle" took 3,624ms.
    Gradle task bundleRelease failed with exit code 1

    #0      throwToolExit (package:flutter_tools/src/base/common.dart:28:3)
    #1      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:751:5)
    <asynchronous suspension>
    #2      buildGradleProject (package:flutter_tools/src/android/gradle.dart:494:14)
    <asynchronous suspension>
    #3      buildAppBundle (package:flutter_tools/src/android/app_bundle.dart:43:10)
    <asynchronous suspension>
    #4      BuildAppBundleCommand.runCommand
    (package:flutter_tools/src/commands/build_appbundle.dart:47:11)
    <asynchronous suspension>
    #5      FlutterCommand.verifyThenRunCommand
    (package:flutter_tools/src/runner/flutter_command.dart:490:18)
    #6      _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:71:64)
    #7      _rootRunUnary (dart:async/zone.dart:1132:38)
    #8      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
    #9      _FutureListener.handleValue (dart:async/future_impl.dart:137:18)
    #10     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:678:45)
    #11     Future._propagateToListeners (dart:async/future_impl.dart:707:32)
    #12     Future._completeWithValue (dart:async/future_impl.dart:522:5)
    #13     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:552:7)
    #14     _rootRun (dart:async/zone.dart:1124:13)
    #15     _CustomZone.run (dart:async/zone.dart:1021:19)
    #16     _CustomZone.runGuarded (dart:async/zone.dart:923:7)
    #17     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:963:23)
    #18     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
    #19     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
    #20     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:116:13)
    #21     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:173:5)

如果尝试flutter run。没有错误,但无法在手机上运行应用程序。

[I] ➜ flutter run
Launching lib/main.dart on 501SO in debug mode...
Initializing gradle...                                              0.5s
Resolving dependencies...                                           1.7s
Running Gradle task 'assembleDebug'...                              1.3s
Gradle task assembleDebug failed with exit code 1

0 个答案:

没有答案