Skip to content Skip to sidebar Skip to footer

Android Gradle - Where To Add "android.debug.obsoleteapi=true"

I updated to AndroidStudio 3.3 which now gives a warning about deprecated libraries: WARNING: API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with

Solution 1:

You need to put it in gradle.properties file which is present at the project level, outside of the app folder not in build.gradle file which you are currently trying to do.

From the android developer documentation

Better debug info when using obsolete API: When the plugin detects that you're using an API that's no longer supported, it can now provide more-detailed information to help you determine where that API is being used. To see the additional info, you need to include the following in your project's gradle.properties file:

android.debug.obsoleteApi=true You can also enable the flag by passing -Pandroid.debug.obsoleteApi=true from the command line.

You can check this Link.

Solution 2:

The easiest way is do it in the terminal at the root of the android project.

Run the following command:

 ./gradlew -Pandroid.debug.obsoleteApi=true

Solution 3:

As stated in the error message, you should add that in gradle.properties file and not in any of your build.gradle files

Post a Comment for "Android Gradle - Where To Add "android.debug.obsoleteapi=true""