sdk路徑問題
The path D:\Android\SDK does not belong to a directory.Android studio will use
兩種解決方法
- 點擊ok更改Gradle Scripts下的local.properties文件的sdk路徑
- 直接更改目標項目的上述文件
grade版本問題
-
查看...\classTest\classTestFifth\gradle\wrapper的gradle-wrapper.properties看版本號
-
下載相應的zip文件到本地C:\Users\Jessica.gradle\wrapper\dists
-
.....gradle\wrapper\dists\gradle-6.1.1-all\cfmwm155h49vnt3hynmlrsdst下解壓
-
刪掉目標項目的grade,然后導入即可(最好不要刪,自己更改設置即可,不然很多問題)
中文路徑問題
Your project path contains non-ASCII characters. This will most likely cause the build to fail on Windows. Please move your project to a different directory. See http://b.android.com/95744 for details. This warning can be disabled by adding the line 'android.overridePathCheck=true' to gradle.properties file in the project directory.
更改到沒有中文的路徑
IDEA版本問題
This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.
解決方法1
change to
classpath 'com.android.tools.build:gradle:4.0.1'
in file build.Gradle (Project)
解決方法2
更新as