11

--Android Studio 2.2.3 (Windows 10 64 bit)

--Build Tools version 25

--Android Gradle Plugin Version 2.2.3

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:

Error:com.android.sched.util.config.PropertyIdException: Property 'jack.library.import' (in Options): element #7: The version of the library file '..\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-1b6639e8217419d056942b0dacd1542739f1709f.jar' is not supported anymore. Library version: 3.2 - Current version: 3.3 - Minimum compatible version: 3.3 ... BUILD FAILED

Has anyone ever had this problem? In the mentioned .jar file I can find some AnimatedVectorDrawble related files. My app build.gradle android { 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
    }
}

}

gpgekko
  • 3,506
  • 3
  • 32
  • 35
android_dev
  • 3,886
  • 1
  • 33
  • 52
  • 2
    Have you tried cleaning the project? Perhaps Jack does not like something from your previous build (using the old settings) when trying to use it with the new settings? – CommonsWare Dec 14 '16 at 13:55
  • @CommonsWare oh, thanks! After clean/build I get some other errors about deprecation, but they are easy to resolve! Thanks a lot! – android_dev Dec 14 '16 at 14:29

1 Answers1

26

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.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491