AppLovin / AppLovin-MAX-Unity-Plugin

127 stars 35 forks source link

Incompatibilities with gradle and applovin mediation adapters and > Your method count exceeds 65K, therefore your project needs to be configured with multiDexEnabled set to true. #414

Open RomainBitard opened 3 months ago

RomainBitard commented 3 months ago

MAX Plugin Version

Latest

Unity Version

2022.3.17f1

Device/Platform Info

Android

Current Behavior

If I set target sdk to 32 it works fine until I add adapters. Now I have

Execution failed for task ':launcher:checkReleaseAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > One or more issues found when checking AAR metadata values:

     Dependency 'androidx.browser:browser:1.6.0-alpha02' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.privacysandbox.ads:ads-adservices-java:1.0.0-beta05' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.privacysandbox.ads:ads-adservices:1.0.0-beta05' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.webkit:webkit:1.11.0-alpha02' requires 'compileSdkVersion' to be set to 34 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.activity:activity:1.7.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.activity:activity-ktx:1.7.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.core:core:1.9.0' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.savedstate:savedstate-ktx:1.2.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.savedstate:savedstate:1.2.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-livedata-core:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-service:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-livedata:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-viewmodel:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-runtime:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-process:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-runtime-ktx:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.core:core-ktx:1.9.0' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.profileinstaller:profileinstaller:1.3.0' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.arch.core:core-runtime:2.2.0' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

     Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires 'compileSdkVersion' to be set to 33 or higher.
     Compilation target for module ':launcher' is 'android-32'

And if I set the target sdk to 34 I have another error

WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34

This Android Gradle plugin (7.1.2) was tested up to compileSdk = 32

Also I get > Your method count exceeds 65K, therefore your project needs to be configured with multiDexEnabled set to true.

Expected Behavior

it should work with target sdk 32 or 34

How to Reproduce

Install app lovin max, add meta/inmobi/pangle/unity/ironsource/liftoff/google adapters

Additional Info

No response

richashukla23 commented 3 months ago

@RomainBitard Could you please try compileSdkVersion 34 along with AGP 8.1.1?

RomainBitard commented 3 months ago

@RomainBitard Could you please try compileSdkVersion 34 along with AGP 8.1.1?

Hello, thanks for replying, what is AGP ?

JonathanLiuApp commented 3 months ago

AGP is the Android Gradle Plugin version. You should be able to change it in your project's build.gradle file.

sanchitgng commented 1 month ago

Any fix for this issue? I am having exactly the same problem. Please help

github-actions[bot] commented 1 week ago

This issue is stale because it has been open for 30 days with no activity.