Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Your project has set `android.useAndroidX=true` but configuration `debugRuntimeClasspath` still contains legacy support libraries

I am getting an warning in android studio when I run my app. the warning is- Your project has set android.useAndroidX=true, but configuration debugRuntimeClasspath still contains legacy support libraries, which may cause runtime issues. And a error- Manifest merger failed with multiple errors, see logs I checked my manifest file and there is no error in my manifest file. I tried debugging the app but it still doesn't fix. I am getting this after updating android studio from android studio arctic fox to android studio bumble bee which is recently released. I updated the gradle version tried cleaning project, invalidating caches but nothing worked. I increased the memory heap size and enabled multidex but still it is not fixed. Please help me out.

like image 300
Arnav Avatar asked Sep 10 '25 15:09

Arnav


2 Answers

  1. Comment this line in settings.gradle
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
  1. Add this in build.gradle (project level):
allprojects {
   repositories {
       google()
       jcenter()
       maven { url "https://jitpack.io" }
   }
}
  1. Add in gradle.properties:
android.enableJetifier=true
android.useAndroidX=true
like image 176
JJ Smith Avatar answered Sep 13 '25 05:09

JJ Smith


Add these in gradle.properties:

android.enableJetifier=true
android.useAndroidX=true

Sync your gradle and Run the app. It worked fine for me and I didn't have to do the changes in setting.gradle and build.gradle (Project level) or any other files.

like image 33
Sayooj Avatar answered Sep 13 '25 06:09

Sayooj