AppLovin / AppLovin-MAX-Unity-Plugin

127 stars 35 forks source link

Unable to load Maven meta-data for Google UMP #411

Closed TamarCurry closed 3 months ago

TamarCurry commented 3 months ago

MAX Plugin Version

6.6.2

Unity Version

2022.3.41f

Device/Platform Info

Android

Current Behavior

When building for Android with consent flow enabled, I encounter the following build error with Gradle:

Execution failed for task ':unityLibrary:generateReleaseRFile'.
> Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'.
   > Could not resolve com.google.android.ump:user-messaging-platform:2.+.
     Required by:
         project :unityLibrary
      > Failed to list versions for com.google.android.ump:user-messaging-platform.
         > Unable to load Maven meta-data from https://artifacts.applovin.com/android/com/google/android/ump/user-messaging-platform/maven-metadata.xml.
            > Could not GET 'https://artifacts.applovin.com/android/com/google/android/ump/user-messaging-platform/maven-metadata.xml'. Received status code 403 from server: Forbidden

Having the consent flow enabled injects the following line into Assets\MaxSdk\AppLovin\Editor\Dependencies.xml:

<androidPackage spec="com.google.android.ump:user-messaging-platform:2.+" />

It causes Gradle to look for Google UMP dependencies from an AppLovin respository.

If I disable consent flow, I do not encounter the Gradle error and can successfully build the APK.

Expected Behavior

Gradle should look for Google UMP dependencies in the proper repository.

How to Reproduce

I'm not sure if it's specific to my project specific. In any case, I did the following:

Additional Info

No response

JonathanLiuApp commented 3 months ago

Unfortunately I wasn't able to reproduce your issue. Could you see if you can reproduce this in our demo app?

TamarCurry commented 3 months ago

Currently I'm unable to reproduce the issue when using the Demo App. I'm slowly adding in the other unity packages that we use to the demo app to see if any additions bring similar results to what I originally posted.

JonathanLiuApp commented 3 months ago

If you are unable to reproduce the issue in the Demo App, you may want to try deleting and re-adding any gradle template files in your project. They can sometimes get messed up - especially if you recently upgraded to a new Unity version.

TamarCurry commented 3 months ago

@JonathanLiuApp that did the trick. Thank you!