问题描述
升级到最新的支持库之后(25.1。 0和23.4.0)以及编译版本的改变(25从23)我得到这个错误:
有没有人有过这个问题?在提到的.jar文件中,我可以找到一些AnimatedVectorDrawble相关的文件。我的应用 build.gradle
android {
compileSdkVersion 25
buildToolsVersion '25 .0.2'
defaultConfig {
applicationId包
minSdkVersion 14
targetSdkVersion 25
versionCode 111
versionName1.1.1
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
jackOptions.enabled = true
}
compileOptions {
sourceCompatibility JavaVersion .VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
maxProcessCount 4
javaMaxHeapSize2g
}
buildTypes {
release {
minifyEnabled false
useProguard false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro '
}
debug {
minifyEnabled false
useProguard false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
applicationIdSuffix.dev
versionNameSuffix-DEV
ext.enableCrashlytics = false
}
}
}
根据错误消息,似乎支持杰克的构建不会处理更新Gradle构建设置的所有情况。杰克保留了预先编译的内容( preJackPackagedLibraries
)的缓存,并且更改了某些内容导致Jack不喜欢该预编译的内容。理想情况下,构建系统会检测到这种情况,只是重新编译它,但显然它不会。
清理项目(Build> Clean Project)希望清除这个在所有情况下都存在问题。
After upgrade to latest support libraries (25.1.0 from 23.4.0) and change of compile version (25 from 23) I get this error:
Has anyone ever had this problem? In the mentioned .jar file I can find some AnimatedVectorDrawble related files. My app build.gradleandroid { compileSdkVersion 25 buildToolsVersion '25.0.2'
defaultConfig {
applicationId "package"
minSdkVersion 14
targetSdkVersion 25
versionCode 111
versionName "1.1.1"
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
jackOptions.enabled = true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
dexOptions {
maxProcessCount 4
javaMaxHeapSize "2g"
}
buildTypes {
release {
minifyEnabled false
useProguard false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
useProguard false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
applicationIdSuffix ".dev"
versionNameSuffix "-DEV"
ext.enableCrashlytics = false
}
}
}
Based on the error message, it appears that Jack-enabled builds do not handle all cases where you update Gradle build settings. Jack keeps a cache of pre-compiled stuff (preJackPackagedLibraries
), and something that you changed caused Jack to not like that pre-compiled material. Ideally, the build system would detect this case and simply re-compile it, but apparently it does not.
Cleaning the project (Build > Clean Project) hopefully clears up this problem in all cases.
这篇关于升级到最新支持库后出现Android JACK编译器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!