How to resolve package conflict issue in Flutter? - flutter

I tried to use google signin and facebbok auth or facebook sigin in my flutter app . I got a perfect output when i add anyone of the faceebook auth or google sigin package . When i try to add both I got a package conflict error
I also tried for both like this : import 'package:google_sign_in/google_sign_in.dart' as google;
But that does not work
**flutter_facebook_login: ^3.0.0
google_sign_in: ^4.1.1**
And the error which i got is :I/flutter (13976): MissingPluginException(No implementation found for method init on channel plugins.flutter.io/google_sign_in)
This is my flutter doctor:
C:\Users\Administrator>flutter doctor -v
[√] Flutter (Channel stable, 2.0.5, on Microsoft Windows [Version 10.0.19042.867], locale en-IN)
• Flutter version 2.0.5 at C:\src\flutter\flutter
• Framework revision adc687823a (6 weeks ago), 2021-04-16 09:40:20 -0700
• Engine revision b09f014e96
• Dart version 2.12.3
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\Administrator\AppData\Local\Android\sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• 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-b01)
[√] Connected device (3 available)
• HD1901 (mobile) • 5c628c62 • android-arm64 • Android 11 (API 30)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.66
• No issues found!

Related

I got Flutter Build time and runtime error - Execution failed for task ':background_locator:compileDebugKotlin'

I got Flutter Build time and runtime error - Execution failed for task ':background_locator:compileDebugKotlin'.
when i try to run the app i got error as below, please help me.
Please can anyone help me to how i solve this problem.
below is my flutter doctor -v output.
PS D:__> flutter doctor -v
[√] Flutter (Channel stable, 3.0.1, on Microsoft Windows [Version 10.0.19044.1706], locale en-IN)
• Flutter version 3.0.1 at D:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fb57da5f94 (8 days ago), 2022-05-19 15:50:29 -0700
• Engine revision caaafc5604
• Dart version 2.17.1
• DevTools version 2.12.2
Checking Android licenses is taking an unexpectedly long time...[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
• Android SDK at C:\Users\Dev_Flutter\AppData\Local\Android\sdk
• Platform android-32, build-tools 31.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.1.0)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.1.32210.238
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.10+0-b96-7249189)
[√] VS Code (version 1.67.2)
• VS Code at C:\Users\Dev_Flutter\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.40.0
[√] Connected device (4 available)
• CPH2127 (mobile) • 1cb8d2b1 • android-arm64 • Android 11 (API 30)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1706]
• Chrome (web) • chrome • web-javascript • Google Chrome 101.0.4951.67
• Edge (web) • edge • web-javascript • Microsoft Edge 101.0.1210.39
[√] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
Try This command in your project directory:
Flutter Pub Upgrade
There may be an inconsistency between your imported package and the flutter version you're using. this command will upgrade your packages to the latest feasible version.
Also, Please Provide your Flutter doctor output which is helpful to find a solution.

my laptop shutdown when ever I lunch a flutter app on an android emulator or genymotion, but not when I lunch an android app on the same emulator

$ flutter doctor -v
[✓] Flutter (Channel stable, 2.2.3, on Linux, locale en_US.UTF-8)
• Flutter version 2.2.3 at /home/jrhp/snap/flutter/common/flutter
• Framework revision f4abaa0735 (3 weeks ago), 2021-07-01 12:46:11 -0700
• Engine revision 241c87ad80
• Dart version 2.13.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /home/jrhp/Android/Sdk
• Platform android-30, build-tools 30.0.3
• Java binary at: /snap/android-studio/113/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
• All Android licenses accepted.
[✓] Chrome - develop for the web
• Chrome at google-chrome
[✓] Android Studio (version 4.2)
• Android Studio at /snap/android-studio/113/android-studio
• Flutter plugin version 58.0.1
• Dart plugin version 202.8531
• Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
[✓] VS Code (version 1.58.0)
• VS Code at /usr/share/code
• Flutter extension version 3.24.0
[✓] Connected device (1 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 91.0.4472.114
• No issues found!

how to correct this error "Error: Could not find or load main class " after running --android-licenses

i keep getting this error after running flutter doctor --android-licenses i installed all sdk tools also i ran the flutter clean and flutter build
and i added the sdk platforms path to env variables
here's my flutter doctor --android-licenses output:
Error: Could not find or load main class USERNAME\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\\..
and here's my flutter doctor -v output :
[√] Flutter (Channel master, 2.3.0-17.0.pre.47, on Microsoft Windows [Version
10.0.19041.985], locale en-CA)
• Flutter version 2.3.0-17.0.pre.47 at C:\src\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision fdb1fb184d (6 days ago), 2021-05-24 22:04:02 -0700
• Engine revision b1385c0df1
• Dart version 2.14.0 (build 2.14.0-145.0.dev)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0-rc4)
• Android SDK at C:\Users\USERNAME\AppData\Local\Android\Sdk
• Platform android-30, build-tools 31.0.0-rc4
• ANDROID_HOME = C:\Users\houda bouhsiss\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more
details.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.2.0)
• Android Studio at C:\Program Files\Android\Android Studio
• 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 11.0.8+10-b944.6842174)
[√] Connected device (2 available)
• Chrome (web) • chrome • web-javascript • Google Chrome 90.0.4430.212
• Edge (web) • edge • web-javascript • Microsoft Edge 90.0.818.66
! Doctor found issues in 1 category.
I fixed it with reinstalling/installing the Android SDK Command-line Tools
More Informations:
https://stackoverflow.com/a/67720572/14058016

Flutter getting 'ActionFactory' isn't a type Error

after search many website to resolve this problem. i can't and when i try to run application i get this error:
Error: 'ActionFactory' isn't a type.
Map<LocalKey, ActionFactory> actions,
^^^^^^^^^^^^^
flutter doctor output:
[√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [Version 6.3.9600], locale en-US)
• Flutter version 1.20.1 at F:\software\flutter
• Framework revision 2ae34518b8 (7 days ago), 2020-08-05 19:53:19 -0700
• Engine revision c8e3b94853
• Dart version 2.9.0
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at F:\software\sdk
• Platform android-30, build-tools 30.0.0
• ANDROID_HOME = F:\software\sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 48.1.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (1 available)
• WAS LX1A (mobile) • 2XJDU17C14006203 • android-arm64 • Android 8.0.0 (API 26)
! Doctor found issues in 1 category.

Hot Reloads 0 libraries out of x libraries even though there are changes to reload

When I hot reload my flutter application, it always reloads 0 out of n number of libraries (Even if I make changes).
I am using Flutter on Intellij. Everything was working fine and now it doesn't work anymore.
Flutter Doctor
[√] Flutter (Channel beta, v1.17.0, on Microsoft Windows [Version
10.0.18362.720], locale en-US)
• Flutter version 1.17.0 at C:\Users\msoha\Desktop\Flutter\flutter
• Framework revision d3ed9ec945 (7 days ago), 2020-04-06 14:07:34 -0700
• Engine revision c9506cb8e9
• Dart version 2.8.0 (build 2.8.0-dev.18.0 eea9717938)
[√] Android toolchain - develop for Android devices (Android SDK
version 29.0.0)
• Android SDK at C:\Users\msoha\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 3.4)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 36.0.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
[√] IntelliJ IDEA Community Edition (version 2019.3)
• IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2019.1.3
• Flutter plugin version 44.0.3
• Dart plugin version 193.6911.31
[√] VS Code (version 1.38.1)
• VS Code at C:\Users\msoha\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.4.1
[√] Connected device (3 available)
• SM S367VL • 5200e8cccc8f76a3 • android-arm • Android 9 (API 28)
• Chrome • chrome • web-javascript • Google Chrome 80.0.3987.163
• Web Server • web-server • web-javascript • Flutter Tools
• No issues found! Process finished with exit code 0
For reference, I am building on an android phone.