Android Studio 编译 Build 出错时 乱码:
解决: 在build.gradle中加入:
tasks.withType(JavaCompile) { options.fork = true options.forkOptions.jvmArgs += ["-Duser.language=en"] } 完美解决
android { compileSdkVersion 31
defaultConfig {
applicationId "com.tencent.asrdemo"
minSdkVersion 28
targetSdkVersion 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
tasks.withType(JavaCompile) {
options.fork = true
options.forkOptions.jvmArgs += ["-Duser.language=en"]
}
}
}
|