API ‘variant.getPackageApplication()’ is obsolete and has been replaced with ‘variant.getPackageApplicationProvider()’.
It will be removed in version 5.0 of the Android Gradle plugin.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getPackageApplication(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app
Solution:
Modify
variant.getPackageApplication().outputDirectory
to
variant.getPackageApplicationProvider().get().outputDirectory
Similar Posts:
- [Solved] ARM/developmentstudio-2020.1 Error: Error: C9511E: Unable to determine the current toolkit. Check that ARM_TOOL_VARIANT is set correctly.
- [Solved] The server does not support writing the combination of value, status and timestamps provided
- Android ERROR: This version of Android Studio cannot open this project, please retry with Android Studio 3.6 or newer.
- [Solved] Appium Error: selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command. Original error: Can’t stop process; it’s not currently runni…
- [Solved] Duplicate class com.blankj.utilcode.BuildConfig found in modules classes.jar
- Android Run App Warning: The application could not be installed: INSTALL_FAILED_TEST_ONLY
- Android studio change project name exception solution: can’t rename root module
- [Solved] android.view.InflateException: Binary XML file line #0: Error inflating class ImageView
- [Solved] com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
- [Solved] Errors reported by genymotion, UI autoviewer and appium