New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Android Resolver resolves wrong dependency versions and takes too long time #591
Comments
This issue does not seem to follow the issue template. Make sure you provide all the required information. |
Update: Please answer the following, if applicable:What's the issue repro rate? 100% What happened? How can we make the problem occur? |
Hi @256p, Thanks for reporting this. I was able to reproduce this behavior on my end, and resolving took almost an hour to complete. I'll be raising this to the team to confirm if this is intended or not. In the meantime, I'll be marking this as a bug, and you may refer to this thread for updates. |
Hi @paulinon , Found another test case. This time it executes relatively fast, but it resolves to the wrong versions.
EDM4U logs the following:
But it is incorrect because it is possible to resolve these 2 libraries without increasing their versions like so:
Here are full logs from EDM4U:
|
Hi @paulinon , I think that I found the root of the problem.
The key point here is using Then I created the following XML for EDM4U:
You can download everything from this branch: https://github.com/256p/unity-jar-resolver-android-issue/tree/minimal-reproducible-example After trying to resolve it EDM4U behaves like before and downloads alpha versions for both libraries. Here are logs:
In contrast, the usual Gradle project for Android ignores the exact version range. Here are the same dependencies from the Gradle project:
Which resolved like so:
And initially, this happened because for some reason But why it took an hour to resolve for |
Hi @256p, I've raised this to the team, and it turns out that it is better for you to enable both Custom Main Gradle Template and Custom Gradle Properties Template in Player Settings so that the Gradle resolves the dependency conflict. With both enabled, the resolver is simply modifying a file instead of downloading all the libraries at once. I've tried this on my end, and resolution succeeded immediately. That said, I'll be closing this for now. Let me know if an issue arises with this solution so this could be reopened. |
[REQUIRED] Please fill in the following fields:
[REQUIRED] Please describe the issue here:
When resolving these two dependencies
com.datadoghq:dd-sdk-android:1.12.0
andcom.google.ads.mediation:inmobi:10.0.7.0
EDM4U Android Resolver makes about 28 attempts and takes about an hour to complete. After completion, all dependencies have the latest versions, for example, androidx.activity resolves to the latest alpha version, which isn't stable.I have tried enabling
Use Gradle Daemon
in Android Resolver Settings, but nothing changed there is the same result.Tested with Android Studio if these two libraries can be resolved and Android Studio resolves them successfully in about 2 minutes.
I created a project with this bug here: https://github.com/256p/unity-jar-resolver-android-issue.git
For me it reproduces in 100% of cases. Unfortenatually I cannot add logs from
Android Dependencies Resolution
window because just freezes due to the enormous amount of text inside.Below is a list of resolved libraries from EDM4U after an hour of waiting:
All versions are the latest possible, which should not happen.
Here is a result of the successful resolution using Gradle project:
The text was updated successfully, but these errors were encountered: