Search code examples
androidandroid-jack-and-jill

What is the minimum SDK version jack compiled code can run well on?


If I build my android project using the jack & jill toolchain I can set the minimum SDK version fairly low. When I have jack enabled via:

android {

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {

        jackOptions {
            enabled true
        }
    }
}

I am able to set minimum sdk to:

minSdkVersion 9

Anything lower and I get the error message:

uses-sdk:minSdkVersion 7 cannot be smaller than version 9 declared in library [com.google.android.gms:play-services-location:7.8.0] {project_folder}/build/intermediates/exploded-aar/com.google.android.gms/play-services-location/7.8.0/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.google.android.gms.location" to force usage

I don't want to go that low. I am just curious if there are any pitfalls in the range of sdks from 14 to 23 that could come from using the jack compiler. Say with a target of 25, and min of 14.

Is there any odd behaviour or issues that would pop up on older versions of android?


Solution

  • Jack only compiles the code. It does not care what your minSdk is, that is more relevant for using android API's etc.

    The reason you're getting an error when you set minSdk below 9 is because google play services requires it to be 9 or higher. If you remove the play services dependency it should work. Also see here