AS项目常见问题
# 项目导入版本兼容问题
1. 修改相应项目/模块的build.gradle
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.iqqcode.helloworld"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
}
dependencies {
compile ''
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
2. gradle-wrapper.properties
修改项目\gradle\wrapper\
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip
1
# 中文乱码问题
修改响应项目下的build.gradle
编码
android {
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.iqqcode.helloworld"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
}
buildTypes {
}
compileOptions {
encoding "GBK"
}
}
dependencies {
compile ''
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
编辑 (opens new window)
上次更新: 2022/03/27, 22:58:50