I'm using Android Studio 3.2 Canary 14 and am trying to migrate an existing project to use AndroidX
. It sounds from https://developer.android.com/topic/libraries/support-library/androidx-rn that I have to have set android.enableJetifier=true
(this was done automatically for me when selecting "Refactor to AndroidX.." option). I've also updated target API level to 28. Anyone else seeing this issue?
Failed to transform '/Users/jooreill/.gradle/caches/modules-2/files-2.1/com.google.firebase/firebase-perf/15.0.0/6e68f6e44b0c9d91756f903547ee3853349ae666/firebase-perf-15.0.0.aar' using Jetifier. Reason: null. (Run with --stacktrace for more details.) To disable Jetifier, set android.enableJetifier=false in your gradle.properties file.
The above error occurs when I run "Clean". In general am getting multiple errors like following if a do gradle sync:
Unable to resolve dependency for ':app-instant@debug/compileClasspath': Failed to transform file 'play-services-measurement-base-15.0.2.aar' to match attributes {artifactType=jetified-aar} using transform JetifyTransform
Why you should migrate your app to AndroidX? Unlike the Support Library, AndroidX packages are separately maintained and updated. The androidx packages use strict Semantic Versioning . So you can update AndroidX libraries in your project independently.
With Android Studio 3.2 and higher, you can migrate an existing project to AndroidX by selecting Refactor > Migrate to AndroidX from the menu bar. The refactor command makes use of two flags. By default, both of them are set to true in your gradle.
Jetpack is a suite of libraries, tools, and guidance to help developers write high-quality apps easier. Jetpack comprises the androidx. * package libraries, unbundled from the platform APIs.
I had been experiencing this problem while running assembleAndroidTest on Jenkins. The weirdest part was that this task ran sans any issues on my mac's terminal without any issues, but failed on Jenkins with-
Failed to transform file 'cucumber-java-1.2.5.jar' to match attributes {artifactType=processed-jar} using transform JetifyTransform
Had been looking for solutions for a couple of days now, having worked though different suggestions - none of which worked.
Finally, disabling Jetifier in gradle.properties resolved it for me.
android.enableJetifier=false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With