Adding Firestore dependency causes error in Flutter app - firebase

Adding cloud_firestore: ^0.12.10 dependency in my flutter project gives errors.
These are the dependencies my project has:
dependencies:
url_launcher: ^5.0.0
flutter_launcher_icons: ^0.7.4
cloud_firestore: ^0.12.10
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
firebase_messaging: ^5.1.6
dev_dependencies:
flutter_test:
sdk: flutter
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/launcher_icon/LauncherIcon.png"
I tried to use different cloud_firestore versions, but none of them worked.
This is the output of flutter run command in the terminal:
Launching lib\main.dart on SM A505F in debug mode...
Initializing gradle... 1.1s
Resolving dependencies... 16.3s
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
FAILURE: Build failed with an exception.
* What went wrong:
Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.2.1,17.2.1]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-iid is being requested by various other libraries at [[20.0.0,20.0.0]], but resolves to 17.1.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
* 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 11s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 11.8s
Gradle task assembleDebug failed with exit code 1
This is the output of flutter doctor -v:
[√] Flutter (Channel stable, v1.9.1+hotfix.6, on Microsoft Windows [Version 10.0.18362.418], locale en-IN)
• Flutter version 1.9.1+hotfix.6 at D:\flutter_windows_v1.9.1+hotfix.2-stable\flutter
• Framework revision 68587a0916 (8 weeks ago), 2019-09-13 19:46:58 -0700
• Engine revision b863200c37
• Dart version 2.5.0
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at C:\Users\aditl\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.2
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 3.5)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 41.0.2
• Dart plugin version 191.8593
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
[√] VS Code (version 1.40.0)
• VS Code at C:\Users\aditl\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.6.0
[√] Connected device (1 available)
• SM A505F • RZ8M60LFVPP • android-arm64 • Android 9 (API 28)
! Doctor found issues in 1 category.

from you log errors
* What went wrong:
Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.2.1,17.2.1]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-iid is being requested by various other libraries at [[20.0.0,20.0.0]], but resolves to 17.1.2. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
you need to update firebase core to 17.2.1 if you have added it to your gradle files,
Although this is an issue with your project not being androidX enabled
see how to migrate to androidX
update
Cannot fit requested classes in a single dex file (# methods: 81876 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
you need to enable multidex for your application
as follows
android {
defaultConfig {
...
minSdkVersion 16
targetSdkVersion 28
multiDexEnabled true
}
...
}
dependencies {
implementation "androidx.multidex:multidex:2.0.0"
}

Add this line of code in your android/build.gradle file in the bottom. I think you missed the step of adding the services plugin.
Try this
and put cloud_firestore: ^0.12.10 dependency below firebase_messaging dependency.
Code:
apply plugin: 'com.google.gms.google-services'

Add this line inside your target 'Runner' do block in your Podfile, e.g.:
# ...
target 'Runner' do
pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.9.0'
# ...
end

Related

Firebase.initializeApp() throwing "No Firebase App '[DEFAULT]' has been created"

I keep getting this error, how can I fix this?
This is my flutter version.
My Flutter version is Flutter 2.6.0-11.0.pre.
This is my flutter doctor -v, seems like there is no problem.
[√] Flutter (Channel dev, 2.6.0-11.0.pre, on Microsoft Windows [Version 10.0.19043.1348], locale ja-JP)
• Flutter version 2.6.0-11.0.pre at C:\hobby-dev\comture-training\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 4b330ddbed (8 weeks ago), 2021-09-16 17:29:58 -0700
• Engine revision 5b81c6d615
• Dart version 2.15.0 (build 2.15.0-116.0.dev)
[X] Android toolchain - develop for Android devices
X Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[!] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
[√] IntelliJ IDEA Community Edition (version 2020.1)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2020.1.2
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
[√] VS Code (version 1.62.2)
• VS Code at C:\Users\bowti\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.28.0
[√] Connected device (2 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 95.0.4638.69
• Edge (web) • edge • web-javascript • Microsoft Edge 93.0.961.52
! Doctor found issues in 2 categories.
And this is my pubspec.yml.
cupertino_icons: ^1.0.2
google_fonts: ^2.1.0
http: ^0.13.0
http_parser: ^4.0.0
firebase_core: ^1.10.0
cloud_firestore: ^3.1.0
I AM callinig Firebase in my main function.
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(WebConsoleTop());
}
Any suggestions?
I googled a lot, and found out that newest version of cloud_firestore needs "await Firebase.initializeApp();", so I did it.
According to my Error log, it seems like the code "await Firebase.initializeApp();" is causing this error.
Any idea what is going on?
FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call Firebase App.initializeApp() (app/no-app).
at Object.u [as app] (https://www.gstatic.com/firebasejs/8.6.1/firebase-app.js:1:18836)
at Object.app$ [as app] (http://localhost:53770/packages/firebase_core_web/src/interop/core.dart.lib.js:31:101)
at initializeApp (http://localhost:53770/packages/firebase_core_web/firebase_core_web.dart.lib.js:101:25)
at initializeApp.next (<anonymous>)
at runBody (http://localhost:53770/dart_sdk.js:40064:34)
at Object._async [as async] (http://localhost:53770/dart_sdk.js:40095:7)
at firebase_core_web.FirebaseCoreWeb.new.initializeApp (http://localhost:53770/packages/firebase_core_web/firebase_core_web.dart.lib.js:81:20)
at initializeApp (http://localhost:53770/packages/firebase_core/firebase_core.dart.lib.js:100:59)
at initializeApp.next (<anonymous>)

Flutter Android build fails with firebase dependencies (Could not find com.google.firebase:firebase-common)

I've been struggling a lot with the following build error after upgrading Firebase libs on pubspec.yaml. It is related to https://github.com/FirebaseExtended/flutterfire/issues/17, but no solution so far. Can anyone help me please?
What went wrong:
Execution failed for task ':firebase_core:generateReleaseRFile'.
> Could not resolve all files for configuration ':firebase_core:releaseCompileClasspath'.
> Could not find com.google.firebase:firebase-common:.
Required by:
project :firebase_core
(I am facing this too: It stops recognizing the GradleException inside of a build.gradle)
Flutter doctor
[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Android Studio (version 4.1)
Pubspec
firebase_auth: ^1.0.1
cloud_firestore: ^1.0.1
firebase_database: ^6.1.0
firebase_core: 1.0.1
google_sign_in: ^5.0.1
Dependencies on build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:4.1.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
}
Dependencies on app/build.gradle
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-bom:26.8.0'
implementation 'com.google.android.gms:play-services-base:17.6.0'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'com.google.firebase:firebase-core:11.0.4'
implementation 'com.google.firebase:firebase-auth:19.7.0'
implementation 'com.google.firebase:firebase-database:19.7.0'
implementation 'com.google.firebase:firebase-firestore:19.7.0'
}
I have already tried, but nothing worked:
decrease to classpath 'com.google.gms:google-services:3.2.1'
flutter clean and packages upgrade
Invalidaded Caches/Restart
Can anyone help me please? 2 days in a row and 0 evidence of what could be causing this. Thanks in advance!
removed external firebase SDK version set in build.gradle file
rootProject.ext {
set('FlutterFire', [
FirebaseSDKVersion: '25.12.0'
])
}
after removing these file it work's for me

How to fix cloud firestore package not installing in flutter project?

Adding firebase cloud firestore to my project dependency packages crashes my apps. I first observed the problem when I was coding along with a youtube tutorial. Now even creating a new flutter project and adding the cloud firestore dependency package then trying to build the app won't work. How to I fix this problem?
Example below is for the app built by flutter on creating a new project with the addition of a cloud firestore dependency package. Any help is appreciated.
Pubspec.yaml
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
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.3
cloud_firestore: ^0.13.7
dev_dependencies:
flutter_test:
sdk: flutter
added cloud_firestore: ^0.13.7 to dependencies.
Debug console log
Running pod install... 478.2s (!)
CocoaPods' output:
↳
Invalid plugin specification: DART_DEFINES=flutter.inspector.structuredErrors=true
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
-> Fetching podspec for `cloud_firestore_web` from `.symlinks/plugins/cloud_firestore_web/ios`
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
-> Fetching podspec for `firebase_core_web` from `.symlinks/plugins/firebase_core_web/ios`
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A BoringSSL-GRPC
A Firebase
A FirebaseAnalytics
A FirebaseCore
A FirebaseCoreDiagnostics
A FirebaseFirestore
A FirebaseInstallations
A Flutter
A GoogleAppMeasurement
A GoogleDataTransport
A GoogleUtilities
A PromisesObjC
A abseil
A cloud_firestore
A cloud_firestore_web
A firebase_core
A firebase_core_web
A gRPC-C++
A gRPC-Core
A leveldb-library
A nanopb
Downloading dependencies
[!] Error installing gRPC-Core
[!] /usr/local/bin/git -C /var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v submodule update --init --recursive
Submodule path 'third_party/abseil-cpp': checked out 'b832dce8489ef7b6231384909fd9b68d5a5ff2b7'
Submodule path 'third_party/benchmark': checked out '090faecb454fbd6e6e17a75ef8146acb037118d4'
Submodule path 'third_party/bloaty': checked out '73594cde8c9a52a102c4341c244c833aa61b9c06'
Submodule path 'third_party/boringssl-with-bazel': checked out '1c2769383f027befac5b75b6cedd25daf3bf4dcf'
Submodule path 'third_party/cares/cares': checked out 'e982924acee7f7313b4baa4ee5ec000c5e373c30'
Submodule path 'third_party/envoy-api': checked out '0487bbb43c3e8b54c7332f74ba7344d8265774f7'
Submodule path 'third_party/gflags': checked out '28f50e0fed19872e0fd50dd23ce2ee8cd759338e'
Submodule path 'third_party/gflags/doc': checked out '8411df715cf522606e3b1aca386ddfc0b63d34b4'
Submodule path 'third_party/googleapis': checked out '80ed4d0bbf65d57cc267dfc63bd2584557f11f9b'
Submodule path 'third_party/googletest': checked out 'c9ccac7cb7345901884aabf5d1a786cfa6e2f397'
Submodule path 'third_party/libuv': checked out '15ae750151ac9341e5945eb38f8982d59fb99201'
Submodule path 'third_party/protobuf': checked out 'fe1790ca0df67173702f70d5646b82f48f412b99'
Submodule path 'third_party/protobuf/third_party/benchmark': checked out '5b7683f49e1e9223cf9927b24f6fd3d6bd82e3f8'
Submodule path 'third_party/protobuf/third_party/googletest': checked out '5ec7f0c4a113e2f18ac2c6cc7df51ad6afc24081'
Submodule path 'third_party/protoc-gen-validate': checked out 'c0a080f4bea50bc087cdd8551143ee538cf3459e'
Submodule path 'third_party/udpa': checked out 'db4b343e48c1264bb4d9ff491b059300701dc7c7'
Submodule path 'third_party/zlib': checked out 'cacf7f1d4e3d44d871b605da3b647f07d718623f'
Submodule 'third_party/abseil-cpp' (https://github.com/abseil/abseil-cpp.git) registered for path 'third_party/abseil-cpp'
Submodule 'third_party/benchmark' (https://github.com/google/benchmark) registered for path 'third_party/benchmark'
Submodule 'third_party/bloaty' (https://github.com/google/bloaty.git) registered for path 'third_party/bloaty'
Submodule 'third_party/boringssl-with-bazel' (https://github.com/google/boringssl.git) registered for path 'third_party/boringssl-with-bazel'
Submodule 'third_party/cares/cares' (https://github.com/c-ares/c-ares.git) registered for path 'third_party/cares/cares'
Submodule 'third_party/envoy-api' (https://github.com/envoyproxy/data-plane-api.git) registered for path 'third_party/envoy-api'
Submodule 'third_party/gflags' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags'
Submodule 'third_party/googleapis' (https://github.com/googleapis/googleapis.git) registered for path 'third_party/googleapis'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/googletest'
Submodule 'third_party/libuv' (https://github.com/libuv/libuv.git) registered for path 'third_party/libuv'
Submodule 'third_party/protobuf' (https://github.com/google/protobuf.git) registered for path 'third_party/protobuf'
Submodule 'third_party/protoc-gen-validate' (https://github.com/envoyproxy/protoc-gen-validate.git) registered for path 'third_party/protoc-gen-validate'
Submodule 'third_party/udpa' (https://github.com/cncf/udpa.git) registered for path 'third_party/udpa'
Submodule 'third_party/zlib' (https://github.com/madler/zlib) registered for path 'third_party/zlib'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/abseil-cpp'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/benchmark'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/boringssl-with-bazel'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/cares/cares'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/envoy-api'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/gflags'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/googleapis'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/googletest'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/libuv'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protoc-gen-validate'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/udpa'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/zlib'...
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/bloaty/third_party/googletest'
Submodule 'third_party/libFuzzer' (https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer) registered for path 'third_party/bloaty/third_party/libFuzzer'
Submodule 'third_party/re2' (https://github.com/google/re2) registered for path 'third_party/bloaty/third_party/re2'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/googletest'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer'. Retry scheduled
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/re2'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer' a second time, aborting
Submodule 'doc' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags/doc'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/gflags/doc'...
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/protobuf/third_party/benchmark'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/protobuf/third_party/googletest'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/benchmark'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/googletest'...
Failed to recurse into submodule path 'third_party/bloaty'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:142:in `rescue in execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:139:in `execute_command'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:166:in `block in executable'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:153:in `target_git'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:114:in `update_submodules'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:101:in `block in clone'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:173:in `block in ui_sub_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:172:in `ui_sub_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:98:in `clone'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/git.rb:66:in `download!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:82:in `block in download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:157:in `block in ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:156:in `ui_action'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-downloader-1.4.0/lib/cocoapods-downloader/base.rb:80:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:108:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:75:in `download_request'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:171:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:154:in `block in uncached_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:181:in `in_tmpdir'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:153:in `uncached_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader/cache.rb:33:in `download_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/downloader.rb:42:in `download'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer/pod_source_installer.rb:118:in `download_source'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:561:in `install_source_of_pod'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:512:in `block (2 levels) in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:86:in `titled_section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:511:in `block in install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:494:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:494:in `install_pod_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:253:in `block in download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:252:in `download_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0.beta.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
Cloning into '/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v'...
Note: checking out 'e122aae3cecae0e6be11b62fbe81eda55e662a02'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
Submodule 'third_party/re2' (https://github.com/google/re2) registered for path 'third_party/bloaty/third_party/re2'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/googletest'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer'. Retry scheduled
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/re2'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer' a second time, aborting
Submodule 'doc' (https://github.com/gflags/gflags.git) registered for path 'third_party/gflags/doc'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/gflags/doc'...
Submodule 'third_party/benchmark' (https://github.com/google/benchmark.git) registered for path 'third_party/protobuf/third_party/benchmark'
Submodule 'third_party/googletest' (https://github.com/google/googletest.git) registered for path 'third_party/protobuf/third_party/googletest'
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/benchmark'...
Cloning into '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/protobuf/third_party/googletest'...
Failed to recurse into submodule path 'third_party/bloaty'
[!] Automatically assigning platform `iOS` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Error running pod install
Error launching application on iPhone 11 Pro.
Exited (sigterm)
flutter doctor -v results
[✓] Flutter (Channel stable, v1.17.5, on Mac OS X 10.15.4 19E287, locale en-ZM)
• Flutter version 1.17.5 at /Users/Silokas_Mac/Developer/flutter
• Framework revision 8af6b2f038 (4 weeks ago), 2020-06-30 12:53:55 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at /Users/Silokas_Mac/Library/Android/sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: /Applications/Android
Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.6)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Xcode 11.6, Build version 11N700h
• CocoaPods version 1.10.0.beta.1
[✓] Android Studio (version 4.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 47.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build
1.8.0_242-release-1644-b3-6222593)
[✓] Connected device (2 available)
• sdk gphone x86 • emulator-5554 • android-x86 • Android
10 (API 29) (emulator)
• iPhone 11 Pro • 659FF369-2ED5-4E0D-B5F8-3D19BE86B98F • ios •
com.apple.CoreSimulator.SimRuntime.iOS-13-6 (simulator)
• No issues found! ```
**Pod file**
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
generated_key_values = {}
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) do |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
generated_key_values[podname] = podpath
else
puts "Invalid plugin specification: #{line}"
end
end
generated_key_values
end
target 'Runner' do
use_frameworks!
use_modular_headers!
# Flutter Pod
copied_flutter_dir = File.join(__dir__, 'Flutter')
copied_framework_path = File.join(copied_flutter_dir, 'Flutter.framework')
copied_podspec_path = File.join(copied_flutter_dir, 'Flutter.podspec')
unless File.exist?(copied_framework_path) && File.exist?(copied_podspec_path)
# Copy Flutter.framework and Flutter.podspec to Flutter/ to have something to link against if the xcode backend script has not run yet.
# That script will copy the correct debug/profile/release version of the framework based on the currently selected Xcode configuration.
# CocoaPods will not embed the framework on pod install (before any build phases can generate) if the dylib does not exist.
generated_xcode_build_settings_path = File.join(copied_flutter_dir, 'Generated.xcconfig')
unless File.exist?(generated_xcode_build_settings_path)
raise "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end
generated_xcode_build_settings = parse_KV_file(generated_xcode_build_settings_path)
cached_framework_dir = generated_xcode_build_settings['FLUTTER_FRAMEWORK_DIR'];
unless File.exist?(copied_framework_path)
FileUtils.cp_r(File.join(cached_framework_dir, 'Flutter.framework'), copied_flutter_dir)
end
unless File.exist?(copied_podspec_path)
FileUtils.cp(File.join(cached_framework_dir, 'Flutter.podspec'), copied_flutter_dir)
end
end
# Keep pod path relative so it can be checked into Podfile.lock.
pod 'Flutter', :path => 'Flutter'
# Plugin Pods
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf .symlinks')
system('mkdir -p .symlinks/plugins')
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.each do |name, path|
symlink = File.join('.symlinks', 'plugins', name)
File.symlink(path, symlink)
pod name, :path => File.join(symlink, 'ios')
end
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENA`enter code here`BLE_BITCODE'] = 'NO'
end
end
end
To use any of the flutterfire plugins it's necessary to include firebase_core as well.
Add
firebase_core: ^0.4.5
to your dependencies. Or find the most recent version on pub.dev.
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
cloud_firestore: ^0.13.7 // move to here
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
OR
Try installing Pubspec Assist plugin in your editor for not getting any error.
I ran into this issue today and worked around it by downgrading git from a 2.31.1 variation to version 2.30.1 (Apple Git-130). See the output of git --version.
For a simple reproducible example of the underlying git issue: git clone --verbose https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer
In the log above see
fatal: unable to access 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer/': Failed to connect to chromium.googlesource.com port 443: Operation timed out
fatal: clone of 'https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer' into submodule path '/private/var/folders/wc/4m_4_wzs56v5z7g3z35vylxw0000gn/T/d20200725-9607-d8qy8v/third_party/bloaty/third_party/libFuzzer' failed
Failed to clone 'third_party/libFuzzer'. Retry scheduled
UPDATE: The 2.31.1 git version now works after the owners of https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer ran git gc

Error Running Gradle - gradlew.bat exited abnormally (Error after adding firebase)

I am trying to read the firestore database. I have:
* Registered My app on firebase .
* copied googleservices.json in the app directory.
* copied the dependencies as firebase instructed.
Flutter Doctor
Upgrading Flutter from C:\flutter...
fa174a123..f31fc1bd0 master -> origin/master
* [new branch] revert-34243-flutter_frame_event -> origin/revert-34243-flutter_frame_event
Updating b593f5167..7a4c33425
11 files changed, 488 insertions(+), 83 deletions(-)
Upgrading engine...
Flutter 1.5.4-hotfix.2 • channel stable •
Framework • revision 7a4c33425d (6 weeks ago) • 2019-04-29 11:05:24 -0700
Engine • revision 52c7a1e849
Tools • Dart 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)
Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.557], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.4)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1)
X Flutter plugin not installed; this adds Flutter specific functionality.
X Dart plugin not installed; this adds Dart specific functionality.
[√] VS Code (version 1.35.1)
[√] Connected device (1 available)
! Doctor found issues in 1 category.
Error
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "C:\Users\USER\Desktop\crm\crm\crm\android\gradlew.bat" exited abnormally:
> 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)
*********************************************************
WARNING: This version of cloud_firestore will break your Android build if it or its dependencies aren't compatible with AndroidX.
See 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.
*********************************************************
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_core-0.4.0+4\android\build.gradle' line: 44
* What went wrong:
A problem occurred evaluating project ':firebase_core'.
> ..\..\pubspec.yaml (The system cannot find the file specified)
* 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
BUILD FAILED in 3s
Command: C:\Users\USER\Desktop\crm\crm\crm\android\gradlew.bat app:properties
Finished with error: Please review your Gradle project setup in the android/ folder.
PUBSPEC.YAML
name: flutter_charts_app
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:
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
flutter_sparkline: ^0.1.0
flutter_staggered_grid_view: ^0.2.7
flutter_circular_chart: ^0.1.0
font_awesome_flutter: ^8.2.0
cloud_firestore: ^0.12.5
firebase_core: ^0.4.0+4
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page:
# 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
# For details regarding adding assets from package dependencies, see
# 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,
When I review my gradlew.bat file. The "JAVA_HOME goto findJavaFromJavaHome" is underlined in red. But I have both Java and Gradle added to my enviroment variables and path.
#if "%DEBUG%" == "" #echo off
#rem ##########################################################################
#rem
#rem Gradle startup script for Windows
#rem
#rem ##########################################################################
#rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
#rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
#rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
#rem Get command-line arguments, handling Windowz variants
if not "%OS%" == "Windows_NT" goto win9xME_args
if "%#eval[2+2]" == "4" goto 4NT_args
:win9xME_args
#rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
goto execute
:4NT_args
#rem Get arguments from the 4NT Shell from JP Software
set CMD_LINE_ARGS=%$
:execute
#rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
#rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
#rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
This issue is resolved in the 0.4.0+5 release of firebase_core. Please try updating and let us know if you run into any further issues.
Just upgrade gradle and kotlin version. In my case
ext.kotlin_version: '1.2.71' -> '1.3.50'
It started working fine.
If issue still persist then keep in mind that this issue is specific to android so setup android project in Android Studio. All issue will be shown. Fix them and it will start working.

Xcode build error for Flutter with Firebase-auth plugin on beta 0.3.2 : incompatible block pointer

This concerns firebase-auth plugin for flutter.
I have the same code running on two mac computers.
I just did a fresh install on the latter, and get a build error on FirebaseAuthPlugin.m : Incompatible block pointer
/Users/sergebesnard/Development/flutter/.pub-cache/hosted/pub.dartlang.org/
firebase_auth-0.5.9/ios/Classes/FirebaseAuthPlugin.m:69:53:
Incompatible block pointer types sending 'void (^)(FIRUser *__strong, NSError *__strong)' to parameter of type 'FIRAuthDataResultCallback _Nullable' (aka 'void (^)(FIRAuthDataResult * _Nullable __strong, NSError * _Nullable __strong)')
On my laptop, the code builds smoothly, the only difference being the beta version, which is 0.3.1 and that the android toolchain is installed.
On the iMac (failing) :
flutter doctor -v
[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.4 17E202, locale fr-BE)
• Flutter version 0.3.2 at /Users/sergebesnard/Development/flutter
• Framework revision 44b7e7d3f4 (3 weeks ago), 2018-04-20 01:02:44 -0700
• Engine revision 09d05a3891
• Dart version 2.0.0-dev.48.0.flutter-fe606f890b
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
If Android SDK has been installed to a custom location, set $ANDROID_HOME to that location.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.3, Build version 9E145
• ios-deploy 1.9.2
• CocoaPods version 1.5.0
[✗] Android Studio (not installed)
• Android Studio not found; download from https://developer.android.com/studio/index.html
(or visit https://flutter.io/setup/#android-setup for detailed instructions).
[✓] VS Code (version 1.23.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.12.1
[✓] Connected devices (1 available)
• iPhone X • 780C4B10-21A6-41E0-9A05-A6175FC20FA0 • ios • iOS 11.3 (simulator)
! Doctor found issues in 2 categories.
on the macbook (working):
[✓] Flutter (Channel beta, v0.3.1, on Mac OS X 10.13.4 17E199, locale fr-BE)
• Flutter version 0.3.1 at /Users/sergebesnard/flutter
• Framework revision 12bbaba9ae (3 weeks ago), 2018-04-19 23:36:15 -0700
• Engine revision 09d05a3891
• Dart version 2.0.0-dev.48.0.flutter-fe606f890b
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
• Android SDK at /Users/sergebesnard/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.2
• 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-915-b08)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.3, Build version 9E145
• ios-deploy 1.9.2
• CocoaPods version 1.5.0
[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 20.0.1
• Dart plugin version 171.4424
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)
[✓] IntelliJ IDEA Community Edition (version 2017.3.4)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 23.2.2
• Dart plugin version 173.4700
[✓] VS Code (version 1.23.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension version 2.12.0
[✓] Connected devices (1 available)
• iPhone X • 03F5FA6E-7332-46A2-9BF8-A1CACE723CC8 • ios • iOS 11.3 (simulator)
• No issues found!
the Podfile is the same :
# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
def parse_KV_file(file, separator='=')
file_abs_path = File.expand_path(file)
if !File.exists? file_abs_path
return [];
end
pods_ary = []
skip_line_start_symbols = ["#", "/"]
File.foreach(file_abs_path) { |line|
next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
plugin = line.split(pattern=separator)
if plugin.length == 2
podname = plugin[0].strip()
path = plugin[1].strip()
podpath = File.expand_path("#{path}", file_abs_path)
pods_ary.push({:name => podname, :path => podpath});
else
puts "Invalid plugin specification: #{line}"
end
}
return pods_ary
end
target 'Runner' do
use_frameworks!
# Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
# referring to absolute paths on developers' machines.
system('rm -rf Pods/.symlinks')
system('mkdir -p Pods/.symlinks/plugins')
# Flutter Pods
generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
if generated_xcode_build_settings.empty?
puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
end
generated_xcode_build_settings.map { |p|
if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
symlink = File.join('Pods', '.symlinks', 'flutter')
File.symlink(File.dirname(p[:path]), symlink)
pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
end
}
# Plugin Pods
plugin_pods = parse_KV_file('../.flutter-plugins')
plugin_pods.map { |p|
symlink = File.join('Pods', '.symlinks', 'plugins', p[:name])
File.symlink(p[:path], symlink)
pod p[:name], :path => File.join(symlink, 'ios')
}
end
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
The pod version is 1.5.0 in both cases.
Pubspec.yaml :
dependencies:
flutter:
sdk: flutter
google_sign_in: "^3.0.2"
firebase_analytics: "^0.3.3"
firebase_auth: "^0.5.5"
firebase_database: "^0.4.6"
firebase_storage: "^0.2.6"
cloud_firestore: "^0.6.3"
#firebase_messaging: "^0.2.4" removed due to bug in android
simple_permissions: "^0.1.2"
diff_match_patch : 0.2.1
path_provider: "^0.4.0"
intl: "^0.15.6"
#timeago: 1.2.0
#side_header_list_view: "^0.0.2"
uuid: "^1.0.0"
#location: "^1.2.0" causes a problem in android
robyn_nlp:
path: ../robyn-nlp
async_message_queue_controller:
path: ../AsyncMessageQueueProcessor
oscillo_wave_painter:
path: ../oscillo-wave-painter
#medcorder_audio:
# path: ../flutter_audio # super important, because the original doesn't work
voice_recorder:
path: ../voice_recorder
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.0
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:
- assets/logo-solo.png
- assets/banner.png
I frankly would prefer not to test upgrading the flutter sdk on my working setup, I still need to work on that stuff...
I don't know if this is helpful, but during setup, I ran into a problem on the installation of flutter on XCODE, because XCODE was not fully setup when at the time.
flutter doctor did ask me to install the package six, and had problem because of a conflict in python#2 versions, so I force uninstalled via brew python#2 and reinstalled it, then could install via `pip install six``
If this is the cause, I will have to reinstall XCODE & Flutter. Hopefully not the case.
Thanks
Serge
update the repository of cocoapods.
pod repo update
Then deletes Podfile, Podfile.lock, Pos directory, .flutter-plugins, .packages, pubspec.lock
Here my tip. Just upgrade cocoapods to 1.5.3+. I install cocoapods by brew.
Check version of cocoapods
pod --version
Upgrade
brew upgrade cocoapods
Link if you get a error conflict
brew link --overwrite cocoapods
Pod install again
pod install

Resources