Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The option android.useNewApkCreator is deprecated

Tags:

android

gradle

I got the following error after upgrading the android gradle plugin version to 8.0, how should I fix this problem.

com.android.tools.build:gradle:8.0.2

gradle-8.0-bin.zip
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
   > com.android.builder.errors.EvalIssueException: The option 'android.useNewApkCreator' is deprecated.
     The current default is 'true'.
     It was removed in version 8.0 of the Android Gradle plugin.

I did not configure this property android.useNewApkCreator in the project.

Adding it now does not work, no matter setting android.useNewApkCreator=true or android.useNewApkCreator=false

like image 357
sowhat Avatar asked Sep 05 '25 03:09

sowhat


1 Answers

Starting from Android Gradle plugin version 8.0, the new APK creator is always enabled by default, and the android.useNewApkCreator option is no longer needed. Therefore, adding or configuring this property will not have any effect.

To fix the issue, you should remove the android.useNewApkCreator configuration from your project. Open your project's build.gradle file (the one in the project root directory) and search for any occurrences of android.useNewApkCreator. Remove the line or lines where this property is set.

After removing the android.useNewApkCreator configuration, sync your project with the Gradle files to ensure the changes take effect.

like image 84
Asiri H. Avatar answered Sep 09 '25 17:09

Asiri H.