Introduction to Flutter
Flutter is a cross-platform open source UI framework developed based on the Dart language launched by Google. It aims to unify the chaotic cross-platform development framework. At the UI level, multiple ends share a set of Dart code to achieve multi-platform adaptive development. Currently, the mobile iOS and Android are more widely used. Although it is rumored that Fuchsia will be a project for the son, that is not something we are considering right now.
The following is a focus of introducing flutter's environment installation and configuration problems and solutions.
(1) When installing the Android SDK, the Android license problem will occur. Just downgrade JAVA JDK to SE8. Many versions do not correspond to it. JAVA8 is relatively stable, including the later gradle also needs to be based on JAVA8.
Problem description: [!] Android toolchain - develop for Android devices (Android SDK 27.0.3) ✗ Android license status unknown.
Solution: After installing JAVA8, run flutter doctor --android-licenses
(2) It is stuck in the Running ‘gradle assembleDebug operation stage and references the domestic Alibaba Cloud image solution.
Problem Description: Running Gradle task 'assembleDebug'...
solve:
Modify the `android/` file in the project
buildscript { repositories { //A place to modify //google() //jcenter() maven { url '/repository/google' } maven { url '/repository/jcenter' } maven { url '/nexus/content/groups/public' } } dependencies { classpath ':gradle:3.2.1' } } allprojects { repositories { //A place to modify //google() //jcenter() maven { url '/repository/google' } maven { url '/repository/jcenter' } maven { url '/nexus/content/groups/public' } } } = '../build' subprojects { = "${}/${}" } subprojects { (':app') } task clean(type: Delete) { delete }
Modify the Flutter configuration file, which is in the `Flutter installation directory/packages/flutter_tools/gradle/`
buildscript { repositories { //A place to modify //google() //jcenter() maven { url '/repository/google' } maven { url '/repository/jcenter' } maven { url '/nexus/content/groups/public' } } dependencies { classpath ':gradle:3.2.1' } }
Summarize
This is the article about flutter environment installation and configuration problems and solutions. For more related flutter environment installation and configuration content, please search for my previous articles or continue browsing the related articles below. I hope everyone will support me in the future!