dnfield / flutter_svg

SVG parsing, rendering, and widget library for Flutter
MIT License
1.66k stars 454 forks source link

requires SDK version >=2.19.0-0 <4.0.0, version solving failed. #849

Closed efraindrummer closed 1 year ago

efraindrummer commented 1 year ago

When using the package with the latest version, it gives me the following error: Because wazeexample depends on flutter_svg >=2.0.0-dev.2 which requires SDK version >=2.19.0-0 <4.0.0, version solving failed . pub get failed (1; Because wazeexample depends on flutter_svg >=2.0.0-dev.2 which requires SDK version >=2.19.0-0 <4.0.0, version solving failed.) exit code 1

I hope you can give me a solution

dnfield commented 1 year ago

You need to be on at least the latest flutter stable to use the latest version of this package. If you're not try an older version of this one.

efraindrummer commented 1 year ago

I have version 3.3.10 and it is totally stable, better I had to use version 1.1.5 of the package

dnfield commented 1 year ago

Can you share your pubspec.yaml from your app?

ShahrearBinAmin commented 1 year ago

I'm also getting the same error

Flutter 3.3.10 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 135454af32 (8 weeks ago) • 2022-12-15 07:36:55 -0800
Engine • revision 3316dd8728
Tools • Dart 2.18.6 • DevTools 2.15.0

pubspec.yaml

name: app
description: mobile app
homepage: https://test.com

publish_to: none

version: 1.3.1+442

environment:
  sdk: ">=2.10.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  flutter_svg: 2.0.0+1

dev_dependencies:
  build_runner: 2.1.11
  built_value_generator: 8.3.2
  flutter_oss_licenses: 2.0.1
  flutter_test:
    sdk: flutter
  integration_test:
    sdk: flutter
  mockito: 5.2.0
  source_gen: 1.2.2
  test: null

# The following section is specific to Flutter.
flutter:
  uses-material-design: true
  assets:
    - assets/
    - assets/images/
    - assets/lottie/
  fonts:
    - family: GT-Walsheim-Pro
      fonts:
        - asset: assets/fonts/GT-Walsheim-Pro-Regular.otf
        - asset: assets/fonts/GT-Walsheim-Pro-Medium.otf
          weight: 600
        - asset: assets/fonts/GT-Walsheim-Pro-Bold.otf
          weight: 700
    - family: Berlingske
      fonts:
        - asset: assets/fonts/Berlingske-Serif-Bold.ttf

I'm getting this error after upgrading gradle android/build.gradle

buildscript {
   repositories {
       ...
   }

   dependencies {
      classpath 'com.android.tools.build:gradle:7.0.0'
      ...
   }
}

android/gradle/wrapper/gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
superuser-chi commented 1 year ago

What worked for me was:

  1. Switch to the master channel using the command flutter channel master
  2. Upgrade to the latest flutter version using the command flutter upgrade.
sadaqatmustafa123 commented 6 months ago

The solution that worked for me was (Windows OS):

I run command shell as an administrator run command "flutter upgrade --force"

boom done:)

maakakasha commented 6 months ago

If i updated my flutter SDK, would I have to update the environment key or no?

SachithyaR commented 3 months ago

What worked for me was:

  1. Switch to the master channel using the command flutter channel master
  2. Upgrade to the latest flutter version using the command flutter upgrade.