https://firebase.google.com/codelabs/firebase-get-to-know-flutter#3
dart pub global activate flutterfire_cli
I followed the instructions on the above page and executed the above command.
When I did so, I received the following error message.
The current Dart SDK version is 2.10.5.
Because pub global activate depends on flutterfire_cli any which requires SDK version >=2.12.0 <3.0.0, version solving failed.
When I ran flutter upgrade to try it out, I got the following message.
Flutter is already up to date on channel stable
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (5 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1
dart pub global activate flutterfire_cli
I then ran the above command again, but still got the same error message.
What should I do?
It seems you have Dart SDK installed with version 2.10.5 separately from the one that came with flutter(Dart v2.15.1). upgrade the Dart SDK with this commands
(MacOS)
brew upgrade dart
(Windows)
choco upgrade dart-sdk
(Linux)
sudo apt-get install dart
Related
After i added the GoogleService-Info.plist file to Runner on xcode, I get this error.
(I work on an M1 Chip MacBook Air)
I uninstalled each cocoapods version, and installed again using the ARM version (sudo arch -x86_64 gem install cocoapods).
But nothing changed.
Edit: Just tried the pod install method inside the ios folder and this is what happened;
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
[!] Automatically assigning platform `iOS` with version `9.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`.
you need first to upgrade your package by write "pub upgrade" command
after it try to update podfile as below setups :
inside terminal move to ios folder "cd ios"
enter "pod update" command
if above point not working try "pod install" command
Final edit: I solved it thanks to this issue. The problem was that there's no Podfile.lock in the /ios folder.
I am on MacBook Pro 16" intel 2019. I am using android studio and my flutter doctor output is given below:
/Users/macbook/Developer/flutter/bin/flutter doctor --verbose [✓] Flutter (Channel stable, 2.5.1, on macOS 12.0.1 21A559 darwin-x64, locale en-GB)
• Flutter version 2.5.1 at /Users/macbook/Developer/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ffb2ecea52 (3 months ago), 2021-09-17 15:26:33 -0400
• Engine revision b3af521a05
• Dart version 2.14.2
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc3)
• Android SDK at /Users/macbook/Library/Android/sdk
• Platform android-31, build-tools 31.0.0-rc3
• 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-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.5, Build version 12E262
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
• 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
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] Connected device (2 available)
• sdk gphone x86 arm (mobile) • emulator-5554 • android-x86 • Android 11 (API 30) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 96.0.4664.93
• No issues found!
my flutter app was running perfectly before but today when I tried to run the app it was taking unexpectedly long time and after 14 mins it get crashed displaying the following message on console:
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:mergeDebugAssets'. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'. > Could not resolve com.facebook.android:facebook-android-sdk:[5,6). Required by: project :app > Failed to list versions for com.facebook.android:facebook-android-sdk. > Unable to load Maven meta-data from https://google.bintray.com/exoplayer/com/facebook/android/facebook-android-sdk/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/com/facebook/android/facebook-android-sdk/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/com/facebook/android/facebook-android-sdk/maven-metadata.xml'. Received status code 502 from server: Bad Gateway * 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 14m 56s [!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Running Gradle task 'assembleDebug'...
and after that error, an error appeared in my android app/build.gradle file.
help me as soon as possible because I have to remove this error till Monday. if you need any more info let me know
Check the build.gradle file in android/ folder (not android/app), ensure you have mavenCentral() in repositories block.
Then use implementation 'com.facebook.android:facebook-android-sdk:latest.release' or
implementation 'com.facebook.android:facebook-android-sdk:12.2.0'
Then rebuild project.
I'm trying to get all my dependencies updated for null safety and the following scenario when I run pod install:
Analyzing dependencies
cloud_firestore: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
cloud_functions: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_analytics: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_database: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '7.3.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "Firebase/Database":
In Podfile:
firebase_database (from `.symlinks/plugins/firebase_database/ios`) was resolved to 6.1.2, which depends on
Firebase/Database (= 7.3.0)
flutter_geofire (from `.symlinks/plugins/flutter_geofire/ios`) was resolved to 0.0.1, which depends on
GeoFire (~> 4.2) was resolved to 4.2.0, which depends on
GeoFire/Database (= 4.2.0) was resolved to 4.2.0, which depends on
Firebase/Database (~> 7.8.0)
Checking the native ios geofire and flutterfire library, I realize that the current version from geofire for iOS aims firebase database ~> 7.8 and the previously one database ~> 6.x.x.
Flutterfire null safety aims firebase 7.3.
Turning actually impossible to find a version with null-safety compatible between flutterfire and geofire.
I have tried before completely remove my pods with the commands without success:
cd ios
rm -rf Pods
rm -rf Podfile.lock
rm -rf ~/.pub-cache/hosted/pub.dartlang.org/
pod cache clean --all
pod deintegrate
flutter clean
flutter pub get
pod repo update
pod install
Any suggestions? thank you!
FAILURE: Build failed with an exception
Firebase admob worked okay in my Flutter app but when running build appbundle --release and I got error as follows below:
Error Output
PS D:\Projects\new\kjv_bible> flutter build appbundle --release
Running Gradle task 'bundleRelease'...
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':firebase_core_web:compileReleaseJavaWithJavac'.
> File 'D:\Projects\new\kjv_bible\build\firebase_core_web\intermediates\annotation_processor_list\release\annotationProcessors.json' specified for property 'processorListFile' does not exist.
* 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 3m 26s
Running Gradle task 'bundleRelease'...
Running Gradle task 'bundleRelease'... Done 209.8s (!)
Gradle task bundleRelease failed with exit code 1
Flutter doctor
Run flutter doctor and paste the output below:
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.720], locale en-US)
• Flutter version 1.12.13+hotfix.9 at C:\src\flutter
• Framework revision f139b11009 (4 weeks ago), 2020-03-30 13:57:30 -0700
• Engine revision af51afceb8
• Dart version 2.7.2
[!] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\ljoe0\AppData\Local\Android\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
X Android license status unknown.
Try re-installing or updating your Android SDK Manager.
See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
instructions.
[√] Android Studio (version 3.6)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 45.0.1
• Dart plugin version 192.7761
• Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code, 64-bit edition (version 1.44.2)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.9.1
[!] Connected device
! No devices available
! Doctor found issues in 2 categories.
I added Firebase_core in the pubspec.yaml and still got the same error.
I googled for this error for hours but to no avail.
Please what could go wrong with this error?
As the op himself stated in comments, deleting .gradle folder fixed the problem.
deleting the folder called .gradle
found inside $/android/.grade
I'm trying to install sbt 0.13.16 using SDK Manager.
$ sdk install sbt 0.13.16
Stop! sbt 0.13.16 is not available. Possible causes:
* 0.13.16 is an invalid version
* sbt binaries are incompatible with Darwin
Below is the SDK details -
$ sdk version
SDKMAN 5.5.13+272
Any reason, why I'm not able to install sbt 0.13.16 using sdk manager.
You are not able to install this version because it is not available.
To find out all the SBT candidate versions available for installation run the command:
sdk list sbt