Q1. The emulator process for AVD Pixel_2_API_29 was killed
Android Emulator Configuration
Q2. Exception in thread “main” java.io.IOException(Gradle download slow)
AS project default directory: C:\Users\ Zheng Zhong. Gradle
AS custom configuration directory: D:\My Documents. Gradle
Download the gradle.zip package and place it in the appropriate directory
Gradle official address: https://services.gradle.org/distributions/ local gradle catalogue local references.lib file cache address: D: \ My Documents \. Gradle \ caches \ \ modules - 2 files - 2.1 GradlePlugin cache address (i.e. the file com. Android. View the build: gradle: 4.0.0) D: \ My Documents\.gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle Version address: D:\My Documents\.gradle\wrapperCopy the code
Q3. Could not initialize class org. Codehaus. Groovy. Runtime. InvokerHelper (Flutter App launches an error)
Please make changes as per below to resolve this error.
Install Java SDK version: 14 or above.
JDK Download link: https://www.oracle.com/java/technologies/javase-jdk14-downloads.html
In gradle-wrapper.properties please use grade version 6.3 or above.
For e.g:distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
Copy the code
Q4. Could not resolve com. Android. View the build: gradle: 4.0.0. Download gradlePlugin failure in (AS)
Q5. Fix AVD startup failure in Android Studio
ANDROID_SDK_HOME needs to be configured in the environment variable
Q6. Aliyun domestic mirror configuration
Ali cloud domestic mirror / / / / buildscript {/ / repositories {/ / maven {url 'https://maven.aliyun.com/repository/public'} / / maven {url 'https://maven.aliyun.com/repository/google' } // maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } // Google () / / jcenter () / /} / / dependencies {/ / classpath "com. Android. View the build: gradle: 4.0.0" / / / / / / NOTE: Do not place your application dependencies here; they belong // // in the individual module build.gradle files // } //} // //allprojects { // repositories { // maven { url 'https://maven.aliyun.com/repository/public' } // maven { url 'https://maven.aliyun.com/repository/google' } // maven { url 'https://maven.aliyun.com/repository/gradle-plugin' } // google() // jcenter() // } //}Copy the code
Q7. Start flutter project times Could not find com. Android. View the build: gradle: 4.0.0.
Reason 1: The reason for not being able to access Google resources is generally because there is no way to access Google resources in China (except for those with external networks and walls, etc.). At this time, the solution is to use the mirror image of Ali. Edit the build.gradle file in the Android directory of the project and remove the Google () and jcenter() lines. And add ali's link below (note: There are two changes) maven {url 'https://maven.aliyun.com/repository/google'} maven {url 'https://maven.aliyun.com/repository/jcenter'} maven {url 'http://maven.aliyun.com/nexus/content/groups/public'} the second step: D:\Program Files\ flutter \flutter_sdk\packages\flutter_tools\gradle\flutter. Gradle Whether people really set from the agent to confirm project directory android/gradle properties to view the files found no proxy Settings Confirm to open the global configuration file, Windows in personal documents directory, In Mac / * nix user directory. Gradle/gradle. Open the properties foundCopy the code
The q8.NDK version does not match
No version of NDK matched the requested version 21.0.6113669. Versions available locally: 21.3.6528147
Q9. There is no ios class in the Flutter project, so it cannot be coded?
Switch to the IOS directory under the Fultter project and use the pod install command to generate the relevant files