Running Android Studio 3.2 with the following settings in my gradle.properties
:
android.useAndroidX=true
android.enableJetifier=true
I have a native project with some C/Java code. With these settings, the compilation fails with the following error message:
org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'android.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
java.lang.RuntimeException: Failed to transform 'C:\Android\sdk\platforms\android-28\android.jar' using Jetifier.
I believe it doesn't like my gradle file:
apply plugin: 'java'
...
dependencies {
implementation files("${mySdkDir}/android.jar")
}
I know I can globally turn off enableJetifier
which would indeed make this error go away. However, I only want to disable the jetifier for this specific module/dependency.
How do I set enableJetifier=false
for a native/java module project?