How to update dart SDK to latest stable version in flutter - intellij-idea

I would like to use dart SDK: ">=2.6.0 <3.0.0" with flutter. But my current version of dart used by Flutter is 2.5.0.
After tried flutter upgrade my flutter version is:
flutter --version
Flutter 1.9.1+hotfix.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 68587a0916 (3 months ago) • 2019-09-13 19:46:58 -0700
Engine • revision b863200c37
Tools • Dart 2.5.0
I have tried to download the latest stable release of Flutter SDK(2.6.1) from the link and replace it with the already available dart-sdk inside flutter > bin > cache > dart-sdk but after this steps I am getting below error:
Wrong full snapshot version, expected 'cb187597a166f2c0c64a200e22509ee3' found 'c8562f0ee0ebc38ba217c7955956d1cb'
Isolate creation failed
Is there any other way to solve these issues and upgrade dart-sdk in flutter?

Flutter only supports Dart 2.5 rigth now. There is now way to support 2.6. You will have to wait for a new Flutter release to support newer versions of Dart.

Related

pub get failed Because circular_slider requires SDK version 2.12.0, version solving failed

I am learning flutter developpment and would like to make an interface using Sleek Circular Slider
When I follow the instruction for adding it in my flutter project, I have an error message when I "pub get". Can you help me please ?
The error message:
The current Dart SDK version is 2.9.1.
Because circular_slider requires SDK version 2.12.0, version solving failed.
pub get failed (1; Because circular_slider requires SDK version 2.12.0, version solving failed.)
Process finished with exit code 1
Here is my YAML file
name: circular_slider
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
sleek_circular_slider: ^2.0.1
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
It's ok, I uninstalled Flutter and Dart from Android Studio, then reinstalled them and I download and extract the last version of flutter, then replace the c:\flutter directory and everything is ok now

No variants found for `react-native-reanimated`

I upgraded my React Native project to Gradle 7.0.2 and now when I open Android Studio it says No variants found for ':react-native-reanimated'. I'm using react-native-reanimated#1.13.3, and from the documentation for versions 1.x.x there's no real configuration, so I'm not sure how to approach this.
Has anyone run into anything similar? I'm using react-native#0.63.4, gradle 7.0.2, and Android Gradle Plugin 7.0.0.
You need to downgrade your Gradle version 7 to 6 because somehow Gradle 7 not work with react-native-reanimated 1.13.3. You can downgrade the version from gradle-wrapper.properties file like below:
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip

Flutter app paused for about 30 seconds to 1 minute during hot reload in IntelliJ or Android Studio

I'm using IntelliJ 2019.1.3 on Ubuntu 19.04. When I make a change then hot reload activates and the IntelliJ Console output shows "The application is paused." After a while it may be responsive again, or freeze long enough that I give up. VSCode hot reloads fine, but I'd prefer to use IntelliJ.
How can I troubleshoot this?
==> flutter doctor -v
[✓] Flutter (Channel stable, v1.7.8+hotfix.3, on Linux, locale en_US.UTF-8)
• Flutter version 1.7.8+hotfix.3 at /home/jibbers42/flutter
• Framework revision b712a172f9 (2 days ago), 2019-07-09 13:14:38 -0700
• Engine revision 54ad777fd2
• Dart version 2.4.0
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /home/jibbers42/bin/android-sdk/
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /home/jibbers42/bin/android-sdk
• ANDROID_SDK_ROOT = /home/jibbers42/bin/android-sdk
• Java binary at:
/home/jibbers42/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5522156/jre/bin/jav
a
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
• All Android licenses accepted.
[✓] Android Studio (version 3.4)
• Android Studio at
/home/jibbers42/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/183.5522156
• Flutter plugin version 35.3.1
• Dart plugin version 183.6270
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b16-5323222)
[✓] IntelliJ IDEA Community Edition (version 2019.1)
• IntelliJ at /home/jibbers42/.local/share/JetBrains/Toolbox/apps/IDEA-C/ch-0/191.7479.19
• Flutter plugin version 37.0.3
• Dart plugin version 191.7830
[✓] VS Code (version 1.36.1)
• VS Code at /usr/share/code
• Flutter extension version 3.2.0
[✓] Connected device (1 available)
• Pixel 3 XL • 89HY071WP • android-arm64 • Android 9 (API 28)
• No issues found!

Dart SDK version error when getting dependencies

I'm trying to add the http and image Dart packages. After adding the dependencies in pubspec.yaml and attempt to "Get dependencies", I'm getting the version error.
I have attempted "Check for Update" in IntelliJ, reinstall Flutter and Dart plug in in IntelliJ, redownload Flutter, and ran "flutter upgrade" in Flutter Console, with no luck. It seems the Dart SDK that comes with Flutter has not been updated.
I was able to download later version of Dart SDK independently, but if I just drop the dart-sdk folder of a newer version into the Flutter folder, I get more error still.
How can I update the Dart SDK in the Flutter package, so I can add dependencies?
The reason was flutter console being in the beta channel, causing flutter to not upgrade to latest version. Fix was flutter channel dev then flutter upgrade in console.

Camera and Geolocation plugin issue with cordova android 6.3.0

I'm facing a issue after upgrading cordova android project to version 6.3.0 in using Camera and Geolocation plugin. These both plugin uses Permission helper class which requires cordova-plugin-compat. But with cordova android version 6.3.0 release cordova-plugin-compat is no longer supported (
https://cordova.apache.org/news/2017/09/22/plugins-release.html) as it is included in the core. But I'm getting error on resolving org.apache.cordova.PermissionHelper and in org.apache.cordova.BuildHelper . How to solve this issue.
Update cordova-plugin-compat to v1.2, which contains a restriction preventing the plugin files being deployed to cordova-android#6.3.0+:
cordova plugin rm cordova-plugin-compat --force
&& cordova plugin add cordova-plugin-compat#1.2