Installation/Importing

 When importing projects, "Dart SDK is not configured" error code may arise.
It can be resolving by linking to bin/cache/dart-sdk in Flutter folder.
It usually happens with projects that were created in other machines. To fix this on Android Studio 3.1.3:
  1. File-> Settings (ctrl+alt+s)
  2. Languages and Frameworks -> Dart
  3. Check "Enable Dart support for the project..."
  4. In "Dart SDK path" click in "..." and navigate to flutter SDK directory. Under that directory you'll find "bin/cache/dart-sdk". This is the dart sdk path you should use.
  5. Click "Apply"
  6. Close the project and open it again (sometimes you need this step, sometimes doesn't)
Tip 1:
Having problem with fetching a package?
Come across this error code: "A dependency may only have one source. sdk: flutter"

This may be due to an an indentation align with sdk (example below).

dependencies:
  flutter:
    sdk: flutter    image_picker: 0.4.1 (Indentation in red)


An indentation in pubspec.yaml makes a world of difference.

Having problem changing your sdk version?

Tip 2:
"Android fails with Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 17 declared in library [:flutter_inappbrowser]"

Go to android>app>build.gradle

minSdkVersion 18
targetSdkVersion 28


https://github.com/pichillilorenzo/flutter_inappbrowser/issues/14

Comments

Popular posts from this blog

Setting up Terminal in Android Studio for Flutter and Bash Profile (For Mac)

Flutter Widget 101 Part 1 (Basic of Flutters, Layouts, Rows and Columns)

Flutter Widget 101 Part 4 (Navigation and Drawers)