Error Running Gradle - gradlew.bat exited abnormally (Error after adding firebase) - 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.

Related

Flutter: include of non-modular header inside framework module 'firebase_core.FLTFirebasePlugin'

I have been trying to run my Flutter code on IOS device. However I am getting some errors regarding non-modular headers inside Framework module.
Logs:
While building module 'firebase_core' imported from
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_auth-0.20.0+1/ios/Classes/FLTFirebaseAuthPlugin.m:5:
In file included from <module-includes>:1:
In file included from
/Users/admin/Desktop/Ali/GuestInMe/ios/Pods/Target Support
Files/firebase_core/firebase_core-umbrella.h:13:
In file included from
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_core-0.7.0/ios/Classes/FLTFirebaseCorePlugin.h:11:
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_core-0.7.0/ios/Classes/FLTFirebasePlugin.h:9:9: error:
include of non-modular header inside framework module
'firebase_core.FLTFirebasePlugin':
'/Users/admin/Desktop/Ali/GuestInMe/ios/Pods/Headers/Public/Firebase
Core/FirebaseCore.h'
[-Werror,-Wnon-modular-include-in-framework-module]
#import <FirebaseCore/FirebaseCore.h>
^
1 error generated.
/Users/admin/Downloads/flutter/.pub-cache/hosted/pub.dartlang.org/fi
rebase_auth-0.20.0+1/ios/Classes/FLTFirebaseAuthPlugin.m:5:9: fatal
error: could not build module 'firebase_core'
#import <firebase_core/FLTFirebasePluginRegistry.h>
~~~~~~~^
2 errors generated.
note: Using new build system
note: Building targets in parallel
note: Planning build
note: Constructing build description
Could not build the application for the simulator.
Error launching application on iPhone 12 Pro Max.
What I have tried:
I tried to change build settings of Xcode and allow non-modular imports -> flutter clean -> pod install in ios folder -> flutter run
Tried changing the file to public from project, but it already was public.
Reinstall all the pod files.
'firebase_core.FLTFirebasePlugin':
What worked eventually:
Put all the pubspec.yaml dependencies to the latest version.
Delete pubspec.lock, Pods folder in ios and Podfile.lock
Run flutter clean -> flutter pub get -> cd ios -> pod install -> cd .. -> flutter run
And you should be good to go
You can fix it by editing Podfile
post_install do |installer|
installer.pods_project.build_configuration_list.build_configurations.each do |configuration|
configuration.build_settings['CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES'] = 'YES'
end
end

react-native build failed after installing admob module

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1001 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
> Configure project :react-native-firebase_admob
:react-native-firebase_admob package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/admob/package.json
:react-native-firebase_app package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/app/package.json
:react-native-firebase_admob:firebase.bom using default value: 26.3.0
:react-native-firebase_admob:ads.consent using default value: 1.0.6
:react-native-firebase_admob package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/admob/package.json
:react-native-firebase_admob:version set from package.json: 10.5.1 (10,5,1 - 10005001)
:react-native-firebase_admob:android.compileSdk using custom value: 29
:react-native-firebase_admob:android.targetSdk using custom value: 29
:react-native-firebase_admob:android.minSdk using custom value: 16
:react-native-firebase_admob:reactNativeAndroidDir /home/muhamed-kveshkshaano/suck/node_modules/react-native/android
> Configure project :react-native-firebase_app
:react-native-firebase_app package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/app/package.json
:react-native-firebase_app:firebase.bom using default value: 26.3.0
:react-native-firebase_app:play.play-services-auth using default value: 19.0.0
:react-native-firebase_app package.json found at /home/muhamed-kveshkshaano/suck/node_modules/#react-native-firebase/app/package.json
:react-native-firebase_app:version set from package.json: 10.5.0 (10,5,0 - 10005000)
:react-native-firebase_app:android.compileSdk using custom value: 29
:react-native-firebase_app:android.targetSdk using custom value: 29
:react-native-firebase_app:android.minSdk using custom value: 16
:react-native-firebase_app:reactNativeAndroidDir /home/muhamed-kveshkshaano/suck/node_modules/react-native/android
> Task :react-native-firebase_app:compileDebugJavaWithJavac
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
37 actionable tasks: 29 executed, 8 up-to-date
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
/home/muhamed-kveshkshaano/.gradle/caches/transforms-2/files-2.1/820765fbb4c63d086027395fb7f0dacc/play-services-ads-lite-19.6.0/AndroidManifest.xml:27:5-38:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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 32s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Note: Some input files use or override a deprecated API.
here is the error, the main problem is each i install admob module #react-native-firebase/admob, it throws this error after trying a lot i couldnt find any solution, it only happens after installing admob module except that it build well, anyone knows whats wrong with that module
I was with the same problem and it work for me
in android/app/build.gradle
defaultConfig {
...
multiDexEnabled true // added for admob problem
}
...
dependencies {
...
implementation "androidx.multidex:multidex:2.0.1" // fix firebaseAdmob
}
in android/build.gradle
dependencies {
classpath('com.android.tools.build:gradle:4.1.2')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.3.3'
}
now open the android folder in Android Studio and wait for gradle will update
when finish the gradle update run npx react-native run-android
downgrade all the rnfirebase libraries that you are using to less than 10.0.0 (admob 7.6.11 and app 9.0.0), as I show in the image

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

Adding Firestore dependency causes error in Flutter app

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

CordovaError: Platform ios already added

I am running on OS X El Capitan. I am working with VSTS and have the TACO plug installed and also have an ios agent running.
I am following these steps trying to build for IOS.
https://www.visualstudio.com/en-us/docs/build/apps/mobile/cordova-build
I have an agent running in interatice mode:
https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-osx
However, the Cordova build step is failing and I cannot understand why after checking all the steps a few times. See bolded error.
***************************************************************************** Finishing: npm install
****************************************************************************** Starting: Cordova Build ios
============================================================================== Task : Cordova Build Description : Build a hybrid app project
based on the Cordova CLI, Ionic CLI, TACO CLI, or other
Cordova-compliant CLI Version : 1.3.9 Author : Microsoft
Corporation Help : More
Information
============================================================================== DEVELOPER_DIR was undefined DEVELOPER_DIR for build set to
/Applications/Xcode8.0.app/Contents/Developer Input to
determineIdentity:
1 valid identities found
XXX
(YGKU7EWJD4)","keychain":"/Users/jordanmc/Documents/repos/myApp/1/s/_tasktmp.keychain"}
Input to determineProfile:
XXX Got rid of som sensitive info
Module cache at /Users/jordanmc/.taco_home/node_modules cordova
already installed. Adding Xcconfig update hook Module cache at
/Users/jordanmc/.taco_home/node_modules cordova already installed.
Adding support plugin. cp: no such file or directory:
/Users/jordanmc/Documents/repos/myApp/resources/ios/icon/icon-40#3x.png
cp: no such file or directory:
/Users/jordanmc/Documents/repos/myApp/resources/ios/icon/icon-83.5#2x.png
Removing Xcconfig update hook { CordovaError: Platform ios already
added.
at /Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/cordova-lib/src/cordova/platform.js:130:31
at _fulfilled (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:787:54)
at self.promiseDispatch.done (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:816:30)
at Promise.promise.promiseDispatch (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:749:13)
at /Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:557:44
at flush (/Users/jordanmc/.taco_home/node_modules/cordova/6.4.0/node_modules/q/q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:67:7) Task failed
> at process._tickCallback (internal/process/next_tick.js:98:9) name: 'CordovaError', message: 'Platform ios already added.',
code: 0, context: undefined }
****************************************************************************** Finishing: Cordova Build ios
****************************************************************************** Starting: Post Job Cleanup
****************************************************************************** Cleaning any cached credential from repository: XXX
****************************************************************************** Finishing: Post Job Cleanup
****************************************************************************** Finishing: Build
I have this configured:
Any help would be great!

Resources