WARNING: The option setting 'android.enableR8=false' is deprecated

I have had this bug on and off for years with my other games and managed somehow to make them work, but with this game, it won’t.

The packages I have are googleplayservices and googleplay ratebox.
I have done so much research and I am now stuck.

I have been trying to build thisproject for a whole week and can’t escape this error.
I have:

  • deleted resolved libraries, built again.
  • delete plugins and re-install
  • change gradle version
  • moved to a new version of the editor
  • remove libraries
  • update old packages

More of the error:
Execution failed for task ‘:launcher:checkReleaseDuplicateClasses’.

1 exception was raised by workers:

java.lang.RuntimeException: Duplicate class android.support.v4.app.RemoteActionCompatParcelizer found in modules core-1.2.0-runtime.jar (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.graphics.drawable.IconCompatParcelizer found in modules core-1.2.0-runtime.jar (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver found in modules core-1.2.0-runtime.jar (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver$1 found in modules core-1.2.0-runtime.jar (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver$MyResultReceiver found in modules core-1.2.0-runtime.jar (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:)
Duplicate class android.support.v4.os.ResultReceiver$MyRunnable found in modules core-1.2.0-runtime.jar (androidx.core:core:1.2.0) and jetified-androidx.core.core-1.2.0-runtime.jar (:androidx.core.core-1.2.0:)
Duplicate class androidx.annotation.AnimRes found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AnimatorRes found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AnyRes found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AnyThread found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.ArrayRes found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.AttrRes found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.BinderThread found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.BoolRes found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.CallSuper found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)
Duplicate class androidx.annotation.CheckResult found in modules annotation-1.3.0.jar (androidx.annotation:annotation:1.3.0) and jetified-androidx.annotation.annotation-1.1.0.jar (androidx.annotation.annotation-1.1.0.jar)

I managed to fix it by downgrading my API to 34 instead of 35 and downgrading my IAP version from 4.12.2 to 4.10.0 in the manifest file in packages.