What does this Plugin Error (Flutter) mean? - flutter

I have updated Flutter and now can't even use it.
The below is the message I get and have no idea how to fix it.
Plugin error
Plugin 'Dart' (version '212.5744') is not compatible with the current version of the IDE, because it requires build 212.5284 or newer but the current build is AI-211.7628.21
Plugin 'Flutter' (version '67.1.2') is not compatible with the current version of the IDE, because it requires build 212.5457.46 or newer but the current build is AI-211.7628.21

Related

Flutter application not working due to Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

I am trying to make a flutter application but I constantly get this error :
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`
I followed this question : Android Studio Error "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8"
and this was the output :
------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------
Build time: 2022-02-08 09:58:38 UTC
Revision: f0d9291c04b90b59445041eaa75b2ee744162586
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 13.0.7 (Private Build 13.0.7+5-Ubuntu-0ubuntu120.04)
OS: Linux 5.4.0-125-generic amd64
JVM points to 13.0.7. What can be issue and how can it be resolved? Thankyou
In your Android Studio IDE, go to ~
Preferences → Build, Execution, Deployment → Build Tools → Gradle → *Gradle JDK
and choose the appropriate JDK version and apply. Try to take the embedded JDK as that would be IDE version appropriate. After this sync project and run.
Check your version of Android Studio and update to Dolphin (2021.3.x).
There are plenty of answers to this question out there that simply ask you to point to the right SDK. None of them appreciate that in some 4.x versions of Android Studio, you can be pointing to the right SDK, but Android Studio keeps pointing to the v1.8, even if you have a version >11 installed and selected in:
Project Structure, or
Preferences
It's possible that: C:*\java -version --> Results in jre/jvm >11, your 'flutter doctor -v' still says: jre/jvm-1.8.
If you don't see the above screen posted by GeekyChick in settings (i.e., "it's a location that only opens up a checkbox where its written generate *.iml files"), than you probably have Android Studio v4.x, rather than a 2021.x or greater.
Upgrade your Android Studio to Dolphin, and re-follow the instructions to choose the right SDK in Project Structure (not Settings).

Upgrading projects Flutter SDK, migration to null-safety - compile time errors in packages

We have decided to upgrade the Flutter version from 1.22 to 2.0 (migrating to null-safety) in an existing project.
We checkout Flutter v2.0.0 and then run the following command:
dart pub upgrade --null-safety
Flutter nicely resolves all dependency conflicts and sets new versions for packages.
Without changing min environment SDK in pubspec.yaml (staying at ">2.10.0 <3.0.0") we fix all breaking changes in the code.
All errors in vs code disappear so we can compile the code. But, when we do compile we get errors from packages e.g. reorderables, fl_chart, flutter_svg etc. stating some classes are undefined. It seems like packages were compiled with a higher SDK version and they weren't set min SDK version to match the one that they were compiled with.
So the package states it can be compiled with Flutter 2.10.0 but in reality, it fails to compile because in this version of Flutter it is missing some necessary imports.
My question is, is this a problem of packages or a problem in my way of processing with migration?
Is it that packages are lacking properly set min SDK?
My conclusion is that most packages are lacking correctly set SDK version constraints. It seems authors usually compile packages for a certain version and do not check min SDK version required. When running dependency resolver it seems to solve dependencies but in compile time it fails.

Android studio reporting older dart-sdk version

I have updated flutter and dart to latest version.
dart --version shows following output:
Dart SDK version: 2.14.4 (stable) (Wed Oct 13 11:11:32 2021 +0200) on "windows_x64"
Yet while running pub.get in android studio reports error with older version of dart-sdk
Here is a portion of my pubspec.yaml:
How to resolve this?
Go to your Android Studio settings and search for Dart SDK path and change it to the location your updated Flutter is.
Also, make sure you don't have multiple Flutter versions installed on your system.
It means that your Dart SDK version does not match the Firebase minimum required version. You can try to update your SDK or the longer and more stable option is checking all the minSdkVersions if they are under the required version or not.
You can simply search in project "minSdkVersion" and if you see flutter.minSdkVersion or something like this, manually change the version the one you need. Like 10 or something you need.
And try not to forget to upgrade newest Flutter version. This way you can never be under the required minSdkVersions.
In my case I had upgraded to new flutter version by command it did but I had more than one sdks the issue is to solve you have to replace the sdks path in android studio (languages and frameworks) of flutter and dart both to newer version, to find new version simply command in terminal (which flutter or which dart) on your preferences.

I am having this error in flutter while using google map through dependency map_view kindly help me

The Android Gradle plugin supports only Kotlin Gradle plugin version 1.3.10 and higher.
The following dependencies do not satisfy the required version:
project ':map_view' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.50
Your gradle plugin version that is supported in your project is 1.3.10 and higher, the plugin you are trying to install is using gradle 1.2.50 there for not supported. I suggest you find another plugin since the only map view plugin i found states that is discontinued. I suggest when you pick a plugin to use to check how often it get updated and when the last update happent.

Failed to apply plugin in android studio

I am working on an app its work good. after i apply external plugin that return error Failed to apply plugin .
my build tool version 2.2.3
and compile version 24
Unfortunately, the suggestion of G.K. did not work!
Please run the following command in your terminal:
.gradlew clean --refresh-dependencies
This will grap the newest version of the Calldorado plugin that is causing this error. The newest version has a fix in it.