AppLovin / AppLovin-MAX-Unity-Plugin

127 stars 35 forks source link

Could not Resolve Android Dependencies when Facebook is installed at Applovin Integration Manager #302

Open alpsoy opened 1 year ago

alpsoy commented 1 year ago

MAX Plugin Version

11.11.3

Unity Version

2021.3.16

Device/Platform Info

Android

Current Behavior

External Dependency Manager Android Resolver cannot resolve if Facebook integration is enabled. It gets stuck attempting resolution again and again. As a result I cannot build for Android as well.

I tried updating MAX and networks, also reverted back to the last stable commit which is currently live on Google Store. I also tried several fixes mentioned on other issues which seem similar.

When I uninstall Facebook from MAX integration, everything works ok.

Here's the error log when I try to build an apk.

`Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

2: Task failed with an exception.

BUILD FAILED in 25s

UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&) (at /Users/bokken/build/output/unity/unity/Modules/IMGUI/GUIUtility.cs:190) `

I have checked the remote locations and indeed repos do not exist at those urls. Below is https://repo.maven.apache.org/maven2/com/google/firebase/ directory

image

Below is my MAX integration.

Screenshot 2023-11-09 at 16 59 09

As I mentioned above, this state of my project was resolving dependencies and building until recently. I tried on several macs, the result is the same. Updating MAX and networks to the latest versions do not work as well. I also tried with Unity 2022.3.10, and that time again Facebook was the problem with specific output, which says some kotlin libs were conflicting.

Expected Behavior

No response

How to Reproduce

  1. Install MAX SDK and networks in the screenshot above.
  2. Try to resolve Android Dependencies.

Additional Info

No response

laststare commented 1 year ago

I have the same problem, but not with Facebook only, same issue with an unity network

mmazurek-fv commented 1 year ago

I also have the same problem, Unity 2021.3.12f1 with Facebook, sometimes other adapters

JonathanLiuApp commented 1 year ago

Hello, could you try deleting the resolved libraries and force resolving using the External Dependency Manager? It should be at Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries

laststare commented 1 year ago

Yes, I did it, but result is the same, now Facebook is ok, but I can’t resolve after adding Unity network. Resolving process takes about an hour and end with error

Ср, 15 нояб. 2023 г. в 00:03, JonathanLiuApp @.***>:

Hello, could you try deleting the resolved libraries and force resolving using the External Dependency Manager? It should be at Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries

— Reply to this email directly, view it on GitHub https://github.com/AppLovin/AppLovin-MAX-Unity-Plugin/issues/302#issuecomment-1810980360, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7EYGE73GJLT7PVBGDFVW3YEO57HAVCNFSM6AAAAAA7EWS4A6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJQHE4DAMZWGA . You are receiving this because you commented.Message ID: @.***>

Coco0007 commented 1 year ago

same here.. Only AppLovin and Unity Adapter is installed in a completely new project(I tried with Unity Versions 2020, 2021, 2022). After 1 hour of waiting gradle shows the error message: "Execution failed for task ':process_androidx.activity.activity-1.8.0.aar`. > Unsupported class file major version 61

I can't copy the whole stacktrace because unity is freezing after gradle failed

It drives me crazy because I thought it has something to do with a wrong java version on my Mac but I get the same results on my windows machine after installing unity for the first time

JonathanLiuApp commented 1 year ago

Could you enable main gradle template and try again? That should speed up the resolution process and may solve your issue.

laststare commented 1 year ago

If i enable main gradle template, i can't start resolution process, i got "Resolution Faild" error immediately. I's very old unity/EDM problem

mmazurek-fv commented 1 year ago

@JonathanLiuApp Maybe this is some problem with the external dependency manager version? I use version 1.2.177 which comes with firebase. That's why I install max sdk without external dependency manager so that it won't be duplicated

laststare commented 1 year ago

@mmazurek-fv I use the same version of dependency manager version. but still got error

ShahHusayn commented 1 year ago

same, cant run force resolve with unity ads and facebook installed otherwise it works properly

Usslessvoid commented 1 year ago

Same problem. The project has: Appsflyer; AppsflyerRevenue; Appmetrica; Play rewiew; FacebookSDK 11.0, ApplovinMAX; Firebase 11.1(analytics, remote config, installations, crashlytics); Aazon APS; Applovin adapters: AdColony; ByteDance; Chartboost; Fyber; GoogleAdMob; GoogleAdManager; InMobi; IronSource; Mintegral; MobileFuse; MyTarget; Smaato; UnityAds; Vungle; Yandex; FACEBOOK

When facebook adapter is connected in project with firebase( analytics dependencies were not resolved in 4 hours (22nd attempt). If you remove the Facebook adapter, everything is resolved normally in a couple of minutes.

Coco0007 commented 1 year ago

Could you enable main gradle template and try again? That should speed up the resolution process and may solve your issue.

This works for us, thank you!

We have installed Tenjin and Firebase (11.6.0) with Crashlytics in addition to AppLovin and a few adapters. The 'Force Resolve' successfully completes the process after 2 seconds. The build is already online, and everything is running as intended.

Bildschirmfoto 2023-11-16 um 17 31 34 Bildschirmfoto 2023-11-16 um 17 37 48
alpsoy commented 1 year ago

Could you enable main gradle template and try again? That should speed up the resolution process and may solve your issue.

This also fixed my issue, only if I keep MAX & Network SDK versions as they are.

When I update them to the latest versions, I ran into errors, which I haven't investigated in detail so they might not be related with this issue.

liuzhuoyang commented 1 year ago

I'm encountering this issue with the Unity AD adapter. Even in an empty project with only AppLovin, when I install the Unity ad adapter and attempt to resolve dependencies, the process starts but never completes. Other adapters work fine, completing the resolve process in about 2 minutes

YaroslavWoFoGames commented 1 year ago

Assets/MaxSdk/Mediation/..../Editor/Dependencies.xml try downgrading adapters manually

laststare commented 1 year ago

@YaroslavWoFoGames Unfortunately, that doesn't help.

laststare commented 1 year ago

@Coco0007 if I use a custom mainTamplate.gradle, I can't run dependencies resolver process. It crashes on start

richashukla23 commented 11 months ago

@liuzhuoyang The problem stems from EDM's inability to resolve dependencies, which is outside our capacity to rectify. However, we strongly recommend switching to letting EDM patch build.gradle instead of having it resolve directly.

To implement this, activate the 'Custom Main Gradle Template' found under PlayerSettings > Publishing Settings. Then, in the EDM Android Resolver Settings, enable the option to 'Patch mainTemplate.gradle'.

mmazurek-fv commented 11 months ago

@richashukla23 This solution doesn't help me. But I carefully checked the build error which points to a line in the android manifest.

property android:name="android.adservices.AD_SERVICES_CONFIG" android:resource="@xml/gma_ad_services_config"

I downgraded the Dependencies.xml file located in Assets\MaxSdk\Mediation\Google\Editor from version 22.5.0.1 to 19.1.0.0. Then it was built, but I don't know if this is a good solution, because I need support for Google CMP / UMP, it is not known whether this version of the adapter supports CMP / UMP

usmanGD commented 11 months ago

I was getting the same issue. I resolve it by downgrading the unity adapter to version 4.6.0.0. I am using Unity 2021.3.11f1 and using AppLovin latest version which is 6.1.1 for unity.

mmazurek-fv commented 11 months ago

I have a solution that helped me. You just need to improve gradle and java. I have now jdk-11.0.17 and gradle-7.3.3 in unity 2021.3.12f1 Here is a tutorial on how to do it. Everything then builds normally https://www.youtube.com/watch?v=NKRTgeatMB0

github-actions[bot] commented 1 week ago

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