Closed dots-alberto-uriarte closed 2 years ago
This issue does not seem to follow the issue template. Make sure you provide all the required information.
Hi @dots-alberto-uriarte,
Thanks for reporting this issue. Could you provide a minimal, reproducible example of your project along with the complete steps to reproduce the issue so that we can identify what's causing this behavior?
Hi @paulinon,
It is happening in a very big and 8 year old LIVE product with many external SDKs so I was hoping that the example provided executing directly the download_artifacts.gradle
was enough. If not I will need a while to prepare a minimal project to reproduce the error. Meanwhile can you please:
download_artifacts.gradle
is using besides the ones passed as argument?I believe I'm facing the same problem as this one https://github.com/googlesamples/unity-jar-resolver/issues/444
Hi @dots-alberto-uriarte,
Could you try this suggestion from the thread you provided and see if it resolves your issue?
Unfortunately, I don't have enough context to answer either question right now. A minimal, reproducible example would be helpful for this scenario.
@dots-alberto-uriarte
download_artifacts.gradle
tried its best to resolve the conflict, but it is just a way to resolve, which is a bit different from what Gradle does by default. For instance, when a conflict like this occurs
- com.google.ads.mediation:applovin:11.0.0.0/com.google.android.gms:play-services-ads:20.5.0
- com.google.ads.mediation:facebook:6.8.0.0/com.google.android.gms:play-services-ads:20.4.0
It would try to change deps to applovin:11.0.0.+
and facebook:6.8.0.+
and resolve again. If failed, it tries applovin:11.0.+
and facebook:6.8.+
, so forth and so on until no conflict occurs. I think Gradle, or what Unity Gradle project does, would just bump up play-services-ads
to 20.5.0
and assume everything would just work perfectly, which can be most of the case.
I am wondering why you need to run download_artifacts.gradle
manually but I guess you may be using a very old version of Unity and EDM4U did not work well to you. Here are some recommendation for you.
Custom Gradle Template
, try https://github.com/googlesamples/unity-jar-resolver/issues/444#issuecomment-884549348 and use the Unity Gradle build system to resolve it instead and see if that result works better to you.Custom Gradle Template
, perhaps try to lower the version of com.google.ads.mediation:applovin:11.0.0.0
and com.google.android.gms:play-services-ads:20.5.0
and see if you can find the versions with no conflict. I would also recommend you to consult with Google Ads team and see what is the best combination.play-services-ads:20.5.0
, try to use play-services-ads:[20.5.0]
, which means exact version.We have not update download_artifacts.gradle
for quite awhile since Unity's Gradle project, along with Custom Gradle Template, usually works better for most of people. We do have this https://github.com/googlesamples/unity-jar-resolver/issues/444 to look into this but we have very little resources lately. Please upvote and comment what you need in that thread.
Let us know if this helps.
Shawn
Hi,
Thanks for reply and your time! I really appreciate the feedback
I am wondering why you need to run
download_artifacts.gradle
manually but I guess you may be using a very old version of Unity and EDM4U did not work well to you.
I don't "need". Our project was not using the Custom Gradle Template
, so Force Resolve
was running the download_artifacts.gradle
. I noticed that in the logs, so I ended running it manually to do faster iterations on how to solve the problem.
- If you are using a Unity version with
Custom Gradle Template
, try [FR] Improve Android Resolver resolution and logging when conflicts occur without mainTemplate.gradle #444 (comment) and use the Unity Gradle build system to resolve it instead and see if that result works better to you.
✅ Yes, this workaround solved the problem. Thanks!
- If you cannot use Unity or
Custom Gradle Template
, perhaps try to lower the version ofcom.google.ads.mediation:applovin:11.0.0.0
andcom.google.android.gms:play-services-ads:20.5.0
and see if you can find the versions with no conflict. I would also recommend you to consult with Google Ads team and see what is the best combination.
I'm afraid this is not a valid option since even if I find a valid combination, there is no guarantee that the maven POD will never been updated with another dependency. I know, it's not likely but it can happen.
- If you HAVE to pin to
play-services-ads:20.5.0
, try to useplay-services-ads:[20.5.0]
, which means exact version.
Yes, I noticed that I can do that. But I wanted to avoid any changes to exported .unitypackage
s since next person upgrading SDKs may forgot to do this step.
Glad to hear that your problem has been solved, @dots-alberto-uriarte. That being said, I'll be closing this for now. You may refer to #444 if there's anything you need.
- If you HAVE to pin to
play-services-ads:20.5.0
, try to useplay-services-ads:[20.5.0]
, which means exact version.
@chkuang-g What happens in this case if another plugin specifies 20.8.0 in their dependencies xml file? Will it halt the resolution with an error.
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the question here:
Hi! Maybe I'm missing something or I don't understand something but it doesn't resolve the dependencies that I'm expecting. Using the artifact download script manually like this:
I got this results
As you see, after a "conflict" between the mediation SDKs, it decides to download
com.google.android.gms:play-services-ads:+
which ends downloading version20.6.0
, while I was expecting to respect the "upper bound" and use20.5.0
.What am I doing wrong?
Thanks