Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter Cloud Firestore Plugin Issue on Android #27304

Closed
dmilicic opened this issue Jan 30, 2019 · 6 comments
Closed

Flutter Cloud Firestore Plugin Issue on Android #27304

dmilicic opened this issue Jan 30, 2019 · 6 comments
Labels
c: crash Stack traces logged to the console p: cloud_firestore Firebase Firestore plugin p: firebase Firebase plugins package flutter/packages repository. See also p: labels.

Comments

@dmilicic
Copy link

Steps to Reproduce

I can't build my Flutter app with the Cloud Firestore plugin for Android!

I followed the example here: https://www.youtube.com/watch?v=DqJ_KjFzL9I

This is a sample app that can not build for Android: https://github.com/dmilicic/flutter-firestore-issue

Pretty much the same issue as here but could not get it resolved by any means: #27128

I tried all kinds of version variations of dependencies with no positive result. The sample app has the Cloud Firestore plugin at version 0.9.0 which should the be latest at this time.

NOTE: It works fine for iOS.

/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:9: error: cannot find symbol
import androidx.annotation.NonNull;
                          ^
  symbol:   class NonNull
  location: package androidx.annotation
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:10: error: cannot find symbol
import androidx.annotation.Nullable;
                          ^
  symbol:   class Nullable
  location: package androidx.annotation
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:253: error: cannot find symbol
          public void onFailure(@NonNull Exception e) {
                                 ^
  symbol: class NonNull
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:274: error: cannot find symbol
                    public Void apply(@NonNull Transaction transaction)
                                       ^
  symbol: class NonNull
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:272: error: cannot find symbol
                    @Nullable
                     ^
  symbol: class Nullable
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:503: error: cannot find symbol
                    public void onFailure(@NonNull Exception e) {
                                           ^
  symbol: class NonNull
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:558: error: cannot find symbol
                    public void onFailure(@NonNull Exception e) {
                                           ^
  symbol: class NonNull
7 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':cloud_firestore:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

Sample app's pubspec.yaml

name: flutter_firestore_issue
description: A new Flutter application.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1

environment:
  sdk: ">=2.0.0-dev.68.0 <3.0.0"

dependencies:

  cloud_firestore: 0.9.0

  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2

dev_dependencies:
  flutter_test:
    sdk: flutter


# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

  # The following line ensures that the Material Icons font is
  # included with your application, so that you can use the icons in
  # the material Icons class.
  uses-material-design: true

  # To add assets to your application, add an assets section, like this:
  # assets:
  #  - images/a_dot_burr.jpeg
  #  - images/a_dot_ham.jpeg

  # An image asset can refer to one or more resolution-specific "variants", see
  # https://flutter.io/assets-and-images/#resolution-aware.

  # For details regarding adding assets from package dependencies, see
  # https://flutter.io/assets-and-images/#from-packages

  # To add custom fonts to your application, add a fonts section here,
  # in this "flutter" section. Each entry in this list should have a
  # "family" key with the font family name, and a "fonts" key with a
  # list giving the asset and other descriptors for the font. For
  # example:
  # fonts:
  #   - family: Schyler
  #     fonts:
  #       - asset: fonts/Schyler-Regular.ttf
  #       - asset: fonts/Schyler-Italic.ttf
  #         style: italic
  #   - family: Trajan Pro
  #     fonts:
  #       - asset: fonts/TrajanPro.ttf
  #       - asset: fonts/TrajanPro_Bold.ttf
  #         weight: 700
  #
  # For details regarding fonts from package dependencies,
  # see https://flutter.io/custom-fonts/#from-packages

Logs

flutter run --verbose

[ +696 ms] > Configure project :app
[        ] registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
[        ] registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
[        ] registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
[        ] registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
[        ] registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
[        ] > Task :app:flutterBuildX86Jar UP-TO-DATE
[  +97 ms] > Task :app:checkDebugClasspath UP-TO-DATE
[        ] > Task :app:preBuild UP-TO-DATE
[        ] > Task :cloud_firestore:preBuild UP-TO-DATE
[        ] > Task :cloud_firestore:preDebugBuild UP-TO-DATE
[        ] > Task :cloud_firestore:checkDebugManifest UP-TO-DATE
[        ] > Task :cloud_firestore:processDebugManifest UP-TO-DATE
[        ] > Task :firebase_core:preBuild UP-TO-DATE
[        ] > Task :firebase_core:preDebugBuild UP-TO-DATE
[        ] > Task :firebase_core:checkDebugManifest UP-TO-DATE
[        ] > Task :firebase_core:processDebugManifest UP-TO-DATE
[        ] > Task :app:preDebugBuild UP-TO-DATE
[        ] > Task :cloud_firestore:compileDebugAidl NO-SOURCE
[        ] > Task :firebase_core:compileDebugAidl NO-SOURCE
[        ] > Task :app:compileDebugAidl NO-SOURCE
[        ] > Task :cloud_firestore:packageDebugRenderscript NO-SOURCE
[        ] > Task :firebase_core:packageDebugRenderscript NO-SOURCE
[        ] > Task :app:compileDebugRenderscript UP-TO-DATE
[        ] > Task :app:checkDebugManifest UP-TO-DATE
[        ] > Task :app:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :app:prepareLintJar UP-TO-DATE
[        ] > Task :app:cleanMergeDebugAssets
[+1997 ms] > Task :app:flutterBuildDebug
[        ] [   +6 ms] executing: [/Users/dmilicic/Documents/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [  +28 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/beta
[        ] [        ] executing: [/Users/dmilicic/Documents/flutter/] git rev-parse --abbrev-ref HEAD
[        ] [   +9 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] beta
[        ] [        ] executing: [/Users/dmilicic/Documents/flutter/] git ls-remote --get-url origin
[        ] [   +9 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [        ] executing: [/Users/dmilicic/Documents/flutter/] git log -n 1 --pretty=format:%H
[        ] [  +13 ms] Exit code 0 from: git log -n 1 --pretty=format:%H
[        ] [        ] 5391447fae6209bb21a89e6a5a6583cac1af9b4b
[        ] [        ] executing: [/Users/dmilicic/Documents/flutter/] git log -n 1 --pretty=format:%ar
[        ] [  +10 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar
[        ] [        ] 9 weeks ago
[        ] [        ] executing: [/Users/dmilicic/Documents/flutter/] git describe --match v*.*.* --first-parent --long --tags
[        ] [  +15 ms] Exit code 0 from: git describe --match v*.*.* --first-parent --long --tags
[        ] [        ] v1.0.0-0-g5391447fa
[        ] [ +232 ms] Found plugin cloud_firestore at /Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/
[        ] [  +10 ms] Found plugin firebase_core at /Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.3.0/
[        ] [  +49 ms] Found plugin cloud_firestore at /Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/
[        ] [   +4 ms] Found plugin firebase_core at /Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/firebase_core-0.3.0/
[        ] [ +341 ms] /Users/dmilicic/Documents/flutter/bin/cache/dart-sdk/bin/dart
/Users/dmilicic/Documents/flutter/bin/cache/artifacts/engine/darwin-x64/frontend_server.dart.snapshot --sdk-root
/Users/dmilicic/Documents/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --strong --target=flutter --no-link-platform --incremental
--packages /Users/dmilicic/Dropbox/projects/flutter/flutter_firestore_issue/.packages --output-dill build/app.dill --depfile
/Users/dmilicic/Dropbox/projects/flutter/flutter_firestore_issue/build/app/intermediates/flutter/debug/snapshot_blob.bin.d --filesystem-scheme
org-dartlang-root package:flutter_firestore_issue/main.dart
[+2398 ms] [+3368 ms] Building bundle
[        ] [        ] Writing asset files to
/Users/dmilicic/Dropbox/projects/flutter/flutter_firestore_issue/build/app/intermediates/flutter/debug/flutter_assets
[  +97 ms] [  +37 ms] Wrote /Users/dmilicic/Dropbox/projects/flutter/flutter_firestore_issue/build/app/intermediates/flutter/debug/flutter_assets
[        ] [   +7 ms] "flutter bundle" took 3,937ms.
[ +100 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[        ] > Task :app:compileDebugShaders UP-TO-DATE
[        ] > Task :app:generateDebugAssets UP-TO-DATE
[        ] > Task :cloud_firestore:mergeDebugShaders UP-TO-DATE
[        ] > Task :cloud_firestore:compileDebugShaders UP-TO-DATE
[        ] > Task :cloud_firestore:generateDebugAssets UP-TO-DATE
[        ] > Task :cloud_firestore:packageDebugAssets UP-TO-DATE
[        ] > Task :firebase_core:mergeDebugShaders UP-TO-DATE
[        ] > Task :firebase_core:compileDebugShaders UP-TO-DATE
[        ] > Task :firebase_core:generateDebugAssets UP-TO-DATE
[        ] > Task :firebase_core:packageDebugAssets UP-TO-DATE
[        ] > Task :app:mergeDebugAssets
[ +100 ms] > Task :app:copyFlutterAssetsDebug
[        ] > Task :app:mainApkListPersistenceDebug UP-TO-DATE
[        ] > Task :app:generateDebugResValues UP-TO-DATE
[        ] > Task :app:generateDebugResources UP-TO-DATE
[        ] > Task :app:processDebugGoogleServices
[        ] Parsing json file: /Users/dmilicic/Dropbox/projects/flutter/flutter_firestore_issue/android/app/google-services.json
[        ] > Task :cloud_firestore:compileDebugRenderscript UP-TO-DATE
[        ] > Task :cloud_firestore:generateDebugResValues UP-TO-DATE
[        ] > Task :cloud_firestore:generateDebugResources UP-TO-DATE
[        ] > Task :cloud_firestore:packageDebugResources UP-TO-DATE
[        ] > Task :firebase_core:compileDebugRenderscript UP-TO-DATE
[        ] > Task :firebase_core:generateDebugResValues UP-TO-DATE
[        ] > Task :firebase_core:generateDebugResources UP-TO-DATE
[        ] > Task :firebase_core:packageDebugResources UP-TO-DATE
[        ] > Task :app:mergeDebugResources UP-TO-DATE
[        ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[        ] > Task :app:processDebugManifest UP-TO-DATE
[        ] > Task :app:splitsDiscoveryTaskDebug UP-TO-DATE
[        ] > Task :cloud_firestore:generateDebugRFile UP-TO-DATE
[        ] > Task :firebase_core:generateDebugRFile UP-TO-DATE
[        ] > Task :app:processDebugResources UP-TO-DATE
[        ] > Task :app:generateDebugSources UP-TO-DATE
[        ] > Task :cloud_firestore:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :cloud_firestore:prepareLintJar UP-TO-DATE
[        ] > Task :cloud_firestore:generateDebugSources UP-TO-DATE
[        ] > Task :cloud_firestore:javaPreCompileDebug UP-TO-DATE
[ +137 ms] > Task :cloud_firestore:compileDebugJavaWithJavac FAILED
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:9: error: cannot find symbol
[   +1 ms] import androidx.annotation.NonNull;
[        ]                           ^
[        ]   symbol:   class NonNull
[        ]   location: package androidx.annotation
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:10: error: cannot find symbol
[        ] import androidx.annotation.Nullable;
[        ]                           ^
[        ]   symbol:   class Nullable
[        ]   location: package androidx.annotation
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:253: error: cannot find symbol
[        ]           public void onFailure(@NonNull Exception e) {
[        ]                                  ^
[        ]   symbol: class NonNull
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:274: error: cannot find symbol
[        ]                     public Void apply(@NonNull Transaction transaction)
[        ]                                        ^
[        ]   symbol: class NonNull
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:272: error: cannot find symbol
[        ]                     @Nullable
[        ]                      ^
[        ]   symbol: class Nullable
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:503: error: cannot find symbol
[        ]                     public void onFailure(@NonNull Exception e) {
[        ]                                            ^
[        ]   symbol: class NonNull
[        ]
/Users/dmilicic/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.9.0/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestor
ePlugin.java:558: error: cannot find symbol
[        ]                     public void onFailure(@NonNull Exception e) {
[        ]                                            ^
[        ]   symbol: class NonNull
[        ] 7 errors
[        ] FAILURE: Build failed with an exception.
[        ] * What went wrong:
[        ] Execution failed for task ':cloud_firestore:compileDebugJavaWithJavac'.
[        ] > Compilation failed; see the compiler error output for details.
[        ] * Try:
[        ] 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.
[        ] * Get more help at https://help.gradle.org
[        ] BUILD FAILED in 5s
[        ] 43 actionable tasks: 6 executed, 37 up-to-date
[ +341 ms] Gradle task 'assembleDebug'... (completed)
[   +9 ms] "flutter run" took 9,350ms.
Gradle task assembleDebug failed with exit code 1

#0      throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
#1      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:399:5)
<asynchronous suspension>
#2      buildGradleProject (package:flutter_tools/src/android/gradle.dart:300:14)
<asynchronous suspension>
#3      buildApk (package:flutter_tools/src/android/apk.dart:43:10)
<asynchronous suspension>
#4      AndroidDevice.startApp (package:flutter_tools/src/android/android_device.dart:379:13)
<asynchronous suspension>
#5      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:289:54)
<asynchronous suspension>
#6      HotRunner.run (package:flutter_tools/src/run_hot.dart:272:39)
<asynchronous suspension>
#7      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:398:37)
<asynchronous suspension>
#8      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:401:18)
#9      _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#10     _rootRunUnary (dart:async/zone.dart:1132:38)
#11     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#12     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#13     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#14     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#15     Future._complete (dart:async/future_impl.dart:476:7)
#16     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#17     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#18     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:295:13)
#19     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#20     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#21     _rootRunUnary (dart:async/zone.dart:1132:38)
#22     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#23     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#24     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#25     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#26     Future._complete (dart:async/future_impl.dart:476:7)
#27     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#28     _AsyncAwaitCompleter.complete (dart:async/runtime/libasync_patch.dart:28:18)
#29     _completeOnAsyncReturn (dart:async/runtime/libasync_patch.dart:295:13)
#30     AndroidDevice.isLocalEmulator (package:flutter_tools/src/android/android_device.dart)
#31     _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#32     _rootRunUnary (dart:async/zone.dart:1132:38)
#33     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#34     _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#35     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#36     Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#37     Future._complete (dart:async/future_impl.dart:476:7)
#38     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#39     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#40     _rootRun (dart:async/zone.dart:1124:13)
#41     _CustomZone.run (dart:async/zone.dart:1021:19)
#42     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#43     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#44     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#45     _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#46     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

flutter analyize:

Analyzing flutter_firestore_issue...                            
No issues found! (ran in 1.4s)

flutter doctor -v:

[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-HR)
    • Flutter version 1.0.0 at /Users/dmilicic/Documents/flutter
    • Framework revision 5391447fae (9 weeks ago), 2018-11-29 19:41:26 -0800
    • Engine revision 7375a0f414
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[!] Android toolchain - develop for Android devices (Android SDK 28.0.3)
    • Android SDK at /Users/dmilicic/Library/Android/sdk
    • Android NDK at /Users/dmilicic/Library/Android/sdk/ndk-bundle
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /Users/dmilicic/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    ✗ Android license status unknown.

[!] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    ✗ Verify that all connected devices have been paired with this computer in Xcode.
      If all devices have been paired, libimobiledevice and ideviceinstaller may require updating.
      To update with Brew, run:
        brew update
        brew uninstall --ignore-dependencies libimobiledevice
        brew uninstall --ignore-dependencies usbmuxd
        brew install --HEAD usbmuxd
        brew unlink usbmuxd
        brew link usbmuxd
        brew install --HEAD libimobiledevice
        brew install ideviceinstaller
    • ios-deploy 1.9.4
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without resolving iOS dependencies with CocoaPods, plugins will not work on iOS.
        For more info, see https://flutter.io/platform-plugins
      To install:
        brew install cocoapods
        pod setup

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 32.0.1
    • Dart plugin version 182.5124
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[!] IntelliJ IDEA Community Edition (version 2018.1.7)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[✓] Connected device (2 available)
    • Pixel 2   • FA79M1A04762                         • android-arm64 • Android 9 (API 28)
    • iPhone XR • BB1AC551-7C0D-4827-B43F-BBF38D90A328 • ios           • iOS 12.1 (simulator)

! Doctor found issues in 3 categories.
@wouterhardeman
Copy link

wouterhardeman commented Jan 30, 2019

This issue is caused by the migration of the plugins to AndroidX. This comment explains what caused it and how you can resolve the issue: #27106 (comment)

@dmilicic
Copy link
Author

So doing a Refactor > Migrate to AndroidX did nothing so I manually migrated all of my build.gradle dependencies as described here: https://developer.android.com/jetpack/androidx/migrate

This made it work!

@zoechi zoechi added c: crash Stack traces logged to the console plugin p: firebase Firebase plugins p: cloud_firestore Firebase Firestore plugin labels Jan 30, 2019
@zoechi zoechi added this to the Goals milestone Jan 30, 2019
@zoechi
Copy link
Contributor

zoechi commented Jan 30, 2019

So doing a Refactor > Migrate to AndroidX did nothing so I manually migrated

This doesn't sound Flutter related, or is it?

@mklim
Copy link
Contributor

mklim commented Jan 30, 2019

So doing a Refactor > Migrate to AndroidX did nothing so I manually migrated

This doesn't sound Flutter related, or is it?

I think this is because if a Flutter project is opened at its root directory in Android Studio, the IDE doesn't actually pick up on any of the Android code enough to provide automated refactoring or edit gradle files. For the automatic refactoring to work the android subdirectory specifically needs to get imported as an Android app. I briefly mentioned it in that comment but didn't really explain the problem. Edited the comment with more information. I'm also working on a PR that will log a warning to the console when these plugins are pulled into gradle and will add instructions for this: flutter/plugins#1138.

@kroikie
Copy link

kroikie commented Oct 13, 2019

@dmilicic

This issue has been moved to firebase/flutterfire#473. Any further collaboration will be done there.

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2021
@flutter-triage-bot flutter-triage-bot bot added the package flutter/packages repository. See also p: labels. label Jul 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
c: crash Stack traces logged to the console p: cloud_firestore Firebase Firestore plugin p: firebase Firebase plugins package flutter/packages repository. See also p: labels.
Projects
None yet
Development

No branches or pull requests

5 participants