Skip to content
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

Closed
256p opened this issue Jan 17, 2023 · 6 comments
Closed

Comments

@256p
Copy link

256p commented Jan 17, 2023

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2022.2.2f1
  • External Dependency Manager version: 1.2.175
  • Source you installed EDM4U: .unitypackage
  • Features in External Dependency Manager in use: Android Resolver
  • Plugins SDK in use: NO other plugins (except unity default)
  • Platform you are using the Unity editor on: Mac

[REQUIRED] Please describe the issue here:

When resolving these two dependencies com.datadoghq:dd-sdk-android:1.12.0 and com.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:

androidx.activity.activity-1.7.0-alpha03.aar
androidx.activity.activity-ktx-1.7.0-alpha03.aar
androidx.annotation.annotation-1.6.0-alpha01.jar
androidx.annotation.annotation-experimental-1.3.0.aar
androidx.appcompat.appcompat-1.7.0-alpha01.aar
androidx.appcompat.appcompat-resources-1.7.0-alpha01.aar
androidx.arch.core.core-common-2.2.0-alpha01.jar
androidx.arch.core.core-runtime-2.2.0-alpha01.aar
androidx.browser.browser-1.5.0-beta01.aar
androidx.collection.collection-1.1.0.jar
androidx.collection.collection-ktx-1.1.0.jar
androidx.concurrent.concurrent-futures-1.0.0.jar
androidx.core.core-1.10.0-alpha01.aar
androidx.core.core-ktx-1.10.0-alpha01.aar
androidx.cursoradapter.cursoradapter-1.0.0.aar
androidx.customview.customview-1.2.0-alpha02.aar
androidx.customview.customview-poolingcontainer-1.0.0.aar
androidx.drawerlayout.drawerlayout-1.2.0-alpha01.aar
androidx.emoji2.emoji2-1.3.0-alpha01.aar
androidx.emoji2.emoji2-views-helper-1.3.0-alpha01.aar
androidx.exifinterface.exifinterface-1.0.0.aar
androidx.fragment.fragment-1.6.0-alpha04.aar
androidx.fragment.fragment-ktx-1.6.0-alpha04.aar
androidx.interpolator.interpolator-1.0.0.aar
androidx.lifecycle.lifecycle-common-2.6.0-alpha04.jar
androidx.lifecycle.lifecycle-livedata-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-livedata-core-ktx-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-process-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-service-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04.aar
androidx.loader.loader-1.1.0.aar
androidx.navigation.navigation-common-2.6.0-alpha04.aar
androidx.navigation.navigation-common-ktx-2.6.0-alpha04.aar
androidx.navigation.navigation-fragment-2.6.0-alpha04.aar
androidx.navigation.navigation-runtime-2.6.0-alpha04.aar
androidx.navigation.navigation-runtime-ktx-2.6.0-alpha04.aar
androidx.recyclerview.recyclerview-1.3.0-rc01.aar
androidx.resourceinspection.resourceinspection-annotation-1.0.1.jar
androidx.room.room-common-2.5.0-rc01.jar
androidx.room.room-runtime-2.5.0-rc01.aar
androidx.savedstate.savedstate-1.2.0.aar
androidx.savedstate.savedstate-ktx-1.2.0.aar
androidx.slidingpanelayout.slidingpanelayout-1.2.0.aar
androidx.sqlite.sqlite-2.3.0-rc01.aar
androidx.sqlite.sqlite-framework-2.3.0-rc01.aar
androidx.startup.startup-runtime-1.1.1.aar
androidx.tracing.tracing-1.0.0.aar
androidx.transition.transition-1.4.1.aar
androidx.vectordrawable.vectordrawable-1.1.0.aar
androidx.vectordrawable.vectordrawable-animated-1.1.0.aar
androidx.versionedparcelable.versionedparcelable-1.1.1.aar
androidx.viewpager.viewpager-1.1.0-alpha01.aar
androidx.window.window-1.1.0-alpha04.aar
androidx.work.work-runtime-2.8.0-rc01.aar
com.datadoghq.dd-sdk-android-1.16.0.aar
com.datadoghq.dd-sdk-android-session-replay-1.16.0.aar
com.google.ads.mediation.inmobi-10.1.2.1.aar
com.google.android.gms.play-services-ads-21.4.0.aar
com.google.android.gms.play-services-ads-base-21.4.0.aar
com.google.android.gms.play-services-ads-identifier-18.0.1.aar
com.google.android.gms.play-services-ads-lite-21.4.0.aar
com.google.android.gms.play-services-appset-16.0.2.aar
com.google.android.gms.play-services-base-18.1.0.aar
com.google.android.gms.play-services-basement-18.1.0.aar
com.google.android.gms.play-services-measurement-base-20.1.2.aar
com.google.android.gms.play-services-measurement-sdk-api-20.1.2.aar
com.google.android.gms.play-services-tasks-18.0.2.aar
com.google.android.ump.user-messaging-platform-2.0.0.aar
com.google.code.gson.gson-2.8.8.jar
com.google.guava.listenablefuture-1.0.jar
com.inmobi.monetization.inmobi-ads-10.1.2.aar
com.inmobi.omsdk.inmobi-omsdk-1.3.17.1.aar
com.lyft.kronos.kronos-android-0.0.1-alpha11.aar
com.lyft.kronos.kronos-java-0.0.1-alpha11.jar
com.squareup.okhttp3.okhttp-3.12.13.jar
com.squareup.okio.okio-1.15.0.jar
com.squareup.picasso.picasso-2.8.aar
io.opentracing.opentracing-api-0.32.0.jar
io.opentracing.opentracing-noop-0.32.0.jar
io.opentracing.opentracing-util-0.32.0.jar
org.jetbrains.annotations-13.0.jar
org.jetbrains.kotlin.kotlin-stdlib-1.7.21.jar
org.jetbrains.kotlin.kotlin-stdlib-common-1.7.21.jar
org.jetbrains.kotlin.kotlin-stdlib-jdk7-1.7.20.jar
org.jetbrains.kotlin.kotlin-stdlib-jdk8-1.7.20.jar
org.jetbrains.kotlinx.kotlinx-coroutines-android-1.6.4.jar
org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.6.4.jar

All versions are the latest possible, which should not happen.

Here is a result of the successful resolution using Gradle project:

+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21 (*)
+--- com.google.ads.mediation:inmobi:10.0.7.0
|    +--- androidx.appcompat:appcompat:1.4.1
|    |    +--- androidx.annotation:annotation:1.3.0
|    |    +--- androidx.core:core:1.7.0
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    +--- androidx.annotation:annotation-experimental:1.1.0
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.0
|    |    |    |    +--- androidx.arch.core:core-runtime:2.1.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    \--- androidx.arch.core:core-common:2.1.0
|    |    |    |    |         \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.4.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.versionedparcelable:versionedparcelable:1.1.1
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    \--- androidx.collection:collection:1.0.0 -> 1.1.0
|    |    |    |         \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    \--- androidx.concurrent:concurrent-futures:1.0.0
|    |    |         +--- com.google.guava:listenablefuture:1.0
|    |    |         \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- androidx.cursoradapter:cursoradapter:1.0.0
|    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    +--- androidx.activity:activity:1.2.4
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.0 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1
|    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.savedstate:savedstate:1.1.0
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- androidx.arch.core:core-common:2.0.1 -> 2.1.0 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.4.0 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    +--- androidx.savedstate:savedstate:1.1.0 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1
|    |    |    |    |    +--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    |    |    +--- androidx.arch.core:core-runtime:2.1.0 (*)
|    |    |    |    |    \--- androidx.lifecycle:lifecycle-common:2.3.1 -> 2.4.0 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 (*)
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    \--- androidx.tracing:tracing:1.0.0
|    |    |         \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    +--- androidx.fragment:fragment:1.3.6
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    +--- androidx.core:core:1.2.0 -> 1.7.0 (*)
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.viewpager:viewpager:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    |    |    \--- androidx.customview:customview:1.0.0
|    |    |    |         +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |         \--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    |    +--- androidx.loader:loader:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.1.0
|    |    |    |    |    +--- androidx.arch.core:core-runtime:2.1.0 (*)
|    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.1.0 -> 2.3.1 (*)
|    |    |    |    |    \--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0 -> 2.3.1 (*)
|    |    |    +--- androidx.activity:activity:1.2.4 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 (*)
|    |    |    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1 (*)
|    |    |    +--- androidx.savedstate:savedstate:1.1.0 (*)
|    |    |    \--- androidx.annotation:annotation-experimental:1.0.0 -> 1.1.0
|    |    +--- androidx.appcompat:appcompat-resources:1.4.1
|    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    +--- androidx.core:core:1.0.1 -> 1.7.0 (*)
|    |    |    +--- androidx.vectordrawable:vectordrawable:1.1.0
|    |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
|    |    |    |    \--- androidx.collection:collection:1.1.0 (*)
|    |    |    \--- androidx.vectordrawable:vectordrawable-animated:1.1.0
|    |    |         +--- androidx.vectordrawable:vectordrawable:1.1.0 (*)
|    |    |         +--- androidx.interpolator:interpolator:1.0.0
|    |    |         |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |         \--- androidx.collection:collection:1.1.0 (*)
|    |    +--- androidx.drawerlayout:drawerlayout:1.0.0
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    +--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    |    \--- androidx.customview:customview:1.0.0 (*)
|    |    +--- androidx.savedstate:savedstate:1.1.0 (*)
|    |    +--- androidx.emoji2:emoji2:1.0.0
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.2.0 -> 1.3.0
|    |    |    +--- androidx.lifecycle:lifecycle-process:2.4.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.4.0 (*)
|    |    |    |    \--- androidx.startup:startup-runtime:1.0.0
|    |    |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |         \--- androidx.tracing:tracing:1.0.0 (*)
|    |    |    +--- androidx.core:core:1.3.0 -> 1.7.0 (*)
|    |    |    \--- androidx.startup:startup-runtime:1.0.0 (*)
|    |    +--- androidx.emoji2:emoji2-views-helper:1.0.0
|    |    |    +--- androidx.emoji2:emoji2:1.0.0 (*)
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    \--- androidx.core:core:1.3.0 -> 1.7.0 (*)
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    +--- androidx.lifecycle:lifecycle-runtime:2.3.1 -> 2.4.0 (*)
|    |    +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 (*)
|    |    \--- androidx.resourceinspection:resourceinspection-annotation:1.0.0
|    |         \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    +--- androidx.annotation:annotation:1.3.0
|    +--- com.google.android.gms:play-services-ads:21.0.0
|    |    +--- androidx.browser:browser:1.0.0 -> 1.3.0
|    |    |    +--- androidx.collection:collection:1.1.0 (*)
|    |    |    +--- androidx.concurrent:concurrent-futures:1.0.0 (*)
|    |    |    +--- androidx.interpolator:interpolator:1.0.0 (*)
|    |    |    +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
|    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    \--- com.google.guava:listenablefuture:1.0
|    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    +--- androidx.core:core:1.0.0 -> 1.7.0 (*)
|    |    +--- com.google.android.gms:play-services-ads-base:21.0.0
|    |    |    \--- com.google.android.gms:play-services-basement:18.0.0
|    |    |         +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |         +--- androidx.core:core:1.2.0 -> 1.7.0 (*)
|    |    |         \--- androidx.fragment:fragment:1.0.0 -> 1.3.6 (*)
|    |    +--- com.google.android.gms:play-services-ads-identifier:18.0.0 -> 18.0.1
|    |    |    \--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    +--- com.google.android.gms:play-services-ads-lite:21.0.0
|    |    |    +--- androidx.work:work-runtime:2.7.0
|    |    |    |    +--- androidx.annotation:annotation-experimental:1.0.0 -> 1.1.0
|    |    |    |    +--- com.google.guava:listenablefuture:1.0
|    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.1.0 (*)
|    |    |    |    +--- androidx.startup:startup-runtime:1.0.0 (*)
|    |    |    |    +--- androidx.core:core:1.6.0 -> 1.7.0 (*)
|    |    |    |    +--- androidx.room:room-runtime:2.2.5
|    |    |    |    |    +--- androidx.room:room-common:2.2.5
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|    |    |    |    |    +--- androidx.sqlite:sqlite-framework:2.0.1 -> 2.1.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    |    |    \--- androidx.sqlite:sqlite:2.1.0
|    |    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |    |    |    +--- androidx.sqlite:sqlite:2.0.1 -> 2.1.0 (*)
|    |    |    |    |    \--- androidx.arch.core:core-runtime:2.0.1 -> 2.1.0 (*)
|    |    |    |    +--- androidx.sqlite:sqlite:2.1.0 (*)
|    |    |    |    +--- androidx.sqlite:sqlite-framework:2.1.0 (*)
|    |    |    |    +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
|    |    |    |    \--- androidx.lifecycle:lifecycle-service:2.1.0
|    |    |    |         \--- androidx.lifecycle:lifecycle-runtime:2.1.0 -> 2.4.0 (*)
|    |    |    +--- com.google.android.gms:play-services-ads-base:21.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-measurement-sdk-api:20.1.2
|    |    |    |    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    |    |    \--- com.google.android.gms:play-services-measurement-base:20.1.2
|    |    |    |         \--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    |    \--- com.google.android.ump:user-messaging-platform:2.0.0
|    |    |         +--- androidx.annotation:annotation:1.0.0 -> 1.3.0
|    |    |         +--- com.google.android.gms:play-services-ads-identifier:17.0.0 -> 18.0.1 (*)
|    |    |         \--- com.google.android.gms:play-services-basement:17.0.0 -> 18.0.0 (*)
|    |    +--- com.google.android.gms:play-services-appset:16.0.1
|    |    |    +--- com.google.android.gms:play-services-base:18.0.0
|    |    |    |    +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|    |    |    |    +--- androidx.core:core:1.2.0 -> 1.7.0 (*)
|    |    |    |    +--- androidx.fragment:fragment:1.0.0 -> 1.3.6 (*)
|    |    |    |    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    |    |    \--- com.google.android.gms:play-services-tasks:18.0.0 -> 18.0.1
|    |    |    |         \--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    |    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    |    \--- com.google.android.gms:play-services-tasks:18.0.0 -> 18.0.1 (*)
|    |    +--- com.google.android.gms:play-services-basement:18.0.0 (*)
|    |    \--- com.google.android.gms:play-services-tasks:18.0.1 (*)
|    \--- com.inmobi.monetization:inmobi-ads:10.0.7
|         +--- com.inmobi.omsdk:inmobi-omsdk:1.3.17.1
|         +--- com.google.android.gms:play-services-ads-identifier:18.0.1 (*)
|         +--- androidx.recyclerview:recyclerview:1.1.0
|         |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
|         |    +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
|         |    +--- androidx.customview:customview:1.0.0 (*)
|         |    \--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
|         +--- com.squareup.picasso:picasso:2.71828
|         |    +--- com.squareup.okhttp3:okhttp:3.10.0 -> 3.12.13
|         |    |    \--- com.squareup.okio:okio:1.15.0
|         |    +--- com.android.support:support-annotations:27.1.0
|         |    \--- com.android.support:exifinterface:27.1.0
|         |         \--- com.android.support:support-annotations:27.1.0
|         \--- androidx.browser:browser:1.3.0 (*)
\--- com.datadoghq:dd-sdk-android:1.12.0
     +--- io.opentracing:opentracing-api:0.32.0
     +--- io.opentracing:opentracing-noop:0.32.0
     |    \--- io.opentracing:opentracing-api:0.32.0
     +--- io.opentracing:opentracing-util:0.32.0
     |    +--- io.opentracing:opentracing-api:0.32.0
     |    \--- io.opentracing:opentracing-noop:0.32.0 (*)
     +--- org.jetbrains.kotlin:kotlin-stdlib:1.5.31 -> 1.7.21 (*)
     +--- com.squareup.okhttp3:okhttp:3.12.13 (*)
     +--- com.google.code.gson:gson:2.8.8
     +--- com.lyft.kronos:kronos-android:0.0.1-alpha11
     |    +--- com.lyft.kronos:kronos-java:0.0.1-alpha11
     |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.7.21 (*)
     |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.4.10 -> 1.7.21 (*)
     +--- androidx.core:core:1.3.1 -> 1.7.0 (*)
     +--- androidx.navigation:navigation-fragment:2.3.0
     |    +--- androidx.fragment:fragment:1.2.4 -> 1.3.6 (*)
     |    \--- androidx.navigation:navigation-runtime:2.3.0
     |         +--- androidx.navigation:navigation-common:2.3.0
     |         |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
     |         |    +--- androidx.core:core:1.1.0 -> 1.7.0 (*)
     |         |    \--- androidx.collection:collection:1.1.0 (*)
     |         +--- androidx.activity:activity:1.1.0 -> 1.2.4 (*)
     |         +--- androidx.lifecycle:lifecycle-viewmodel:2.2.0 -> 2.3.1 (*)
     |         +--- androidx.savedstate:savedstate:1.0.0 -> 1.1.0 (*)
     |         \--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.2.0 -> 2.3.1 (*)
     +--- androidx.navigation:navigation-runtime-ktx:2.3.0
     |    +--- androidx.navigation:navigation-runtime:2.3.0 (*)
     |    +--- androidx.navigation:navigation-common-ktx:2.3.0
     |    |    +--- androidx.navigation:navigation-common:2.3.0 (*)
     |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.71 -> 1.7.21 (*)
     |    |    +--- androidx.core:core-ktx:1.1.0
     |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.31 -> 1.7.21 (*)
     |    |    |    +--- androidx.annotation:annotation:1.1.0 -> 1.3.0
     |    |    |    \--- androidx.core:core:1.1.0 -> 1.7.0 (*)
     |    |    \--- androidx.collection:collection:1.1.0 (*)
     |    +--- androidx.activity:activity-ktx:1.1.0
     |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |    +--- androidx.activity:activity:1.1.0 -> 1.2.4 (*)
     |    |    +--- androidx.core:core-ktx:1.1.0 (*)
     |    |    +--- androidx.lifecycle:lifecycle-runtime-ktx:2.2.0
     |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0
     |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |    |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0
     |    |    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50 -> 1.7.21
     |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.2.0 -> 2.4.0 (*)
     |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.3.0
     |    |    \--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0
     |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0 (*)
     |    |         \--- androidx.lifecycle:lifecycle-viewmodel:2.2.0 -> 2.3.1 (*)
     |    +--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0 (*)
     |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.3.71 -> 1.7.21 (*)
     +--- androidx.recyclerview:recyclerview:1.1.0 (*)
     \--- androidx.work:work-runtime:2.7.0 (*)
@256p 256p added new to be triaged type: question labels Jan 17, 2023
@google-oss-bot
Copy link

This issue does not seem to follow the issue template. Make sure you provide all the required information.

@paulinon paulinon removed the new to be triaged label Jan 17, 2023
@256p
Copy link
Author

256p commented Jan 17, 2023

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?
Described above.
Pull https://github.com/256p/unity-jar-resolver-android-issue.git and launch Assets > External Dependency Manager > Android Resolver > Resolve or Force Resolve

@paulinon
Copy link
Collaborator

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.

@256p
Copy link
Author

256p commented Jan 18, 2023

Hi @paulinon ,

Found another test case. This time it executes relatively fast, but it resolves to the wrong versions.
For a test I used these libraries:

<androidPackage spec="androidx.activity:activity:1.2.4"/>
<androidPackage spec="androidx.activity:activity-ktx:1.1.0"/>

EDM4U logs the following:

The following dependency versions were modified:
androidx.activity:activity:1.2.4 --> androidx.activity:activity:1.+
androidx.activity:activity-ktx:1.1.0 --> androidx.activity:activity-ktx:1.+

But it is incorrect because it is possible to resolve these 2 libraries without increasing their versions like so:

+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.21
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.7.21
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.21
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.21 (*)
+--- androidx.activity:activity:1.2.4
|    +--- androidx.annotation:annotation:1.1.0
|    +--- androidx.core:core:1.1.0
|    |    +--- androidx.annotation:annotation:1.1.0
|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.3.1
|    |    |    +--- androidx.arch.core:core-runtime:2.1.0
|    |    |    |    +--- androidx.annotation:annotation:1.1.0
|    |    |    |    \--- androidx.arch.core:core-common:2.1.0
|    |    |    |         \--- androidx.annotation:annotation:1.1.0
|    |    |    +--- androidx.lifecycle:lifecycle-common:2.3.1
|    |    |    |    \--- androidx.annotation:annotation:1.1.0
|    |    |    +--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    \--- androidx.annotation:annotation:1.1.0
|    |    +--- androidx.versionedparcelable:versionedparcelable:1.1.0
|    |    |    +--- androidx.annotation:annotation:1.1.0
|    |    |    \--- androidx.collection:collection:1.0.0
|    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    \--- androidx.collection:collection:1.0.0 (*)
|    +--- androidx.lifecycle:lifecycle-runtime:2.3.1 (*)
|    +--- androidx.lifecycle:lifecycle-viewmodel:2.3.1
|    |    \--- androidx.annotation:annotation:1.1.0
|    +--- androidx.savedstate:savedstate:1.1.0
|    |    +--- androidx.annotation:annotation:1.1.0
|    |    +--- androidx.arch.core:core-common:2.0.1 -> 2.1.0 (*)
|    |    \--- androidx.lifecycle:lifecycle-common:2.0.0 -> 2.3.1 (*)
|    +--- androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1
|    |    +--- androidx.annotation:annotation:1.0.0 -> 1.1.0
|    |    +--- androidx.savedstate:savedstate:1.1.0 (*)
|    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.3.1
|    |    |    +--- androidx.arch.core:core-common:2.1.0 (*)
|    |    |    +--- androidx.arch.core:core-runtime:2.1.0 (*)
|    |    |    \--- androidx.lifecycle:lifecycle-common:2.3.1 (*)
|    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.3.1 (*)
|    +--- androidx.collection:collection:1.0.0 (*)
|    \--- androidx.tracing:tracing:1.0.0
|         \--- androidx.annotation:annotation:1.1.0
\--- androidx.activity:activity-ktx:1.1.0
     +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     +--- androidx.activity:activity:1.1.0 -> 1.2.4 (*)
     +--- androidx.core:core-ktx:1.1.0
     |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.31 -> 1.7.21 (*)
     |    +--- androidx.annotation:annotation:1.1.0
     |    \--- androidx.core:core:1.1.0 (*)
     +--- androidx.lifecycle:lifecycle-runtime-ktx:2.2.0
     |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0
     |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |    \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0
     |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
     |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50 -> 1.7.21
     |    +--- androidx.lifecycle:lifecycle-runtime:2.2.0 -> 2.3.1 (*)
     |    \--- androidx.annotation:annotation:1.0.0 -> 1.1.0
     \--- androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0
          +--- org.jetbrains.kotlin:kotlin-stdlib:1.3.50 -> 1.7.21 (*)
          +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0 (*)
          \--- androidx.lifecycle:lifecycle-viewmodel:2.2.0 -> 2.3.1 (*)

Here are full logs from EDM4U:

Running Gradle...

/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/gradlew --no-daemon -b "/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=/Applications/Unity/Hub/Editor/2022.2.2f1/PlaybackEngines/AndroidPlayer/SDK" "-PTARGET_DIR=/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Assets/Plugins/Android" "-PMAVEN_REPOS=https://repo1.maven.org/maven2;https://dl.google.com/dl/android/maven2/" "-PPACKAGES_TO_COPY=androidx.activity:activity:1.2.4;androidx.activity:activity-ktx:1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=7.1.2"
Executing command: /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/gradlew --no-daemon -b "/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=/Applications/Unity/Hub/Editor/2022.2.2f1/PlaybackEngines/AndroidPlayer/SDK" "-PTARGET_DIR=/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Assets/Plugins/Android" "-PMAVEN_REPOS=https://repo1.maven.org/maven2;https://dl.google.com/dl/android/maven2/" "-PPACKAGES_TO_COPY=androidx.activity:activity:1.2.4;androidx.activity:activity-ktx:1.1.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=7.1.2"
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.vmplugin.v7.Java7$1 (file:/Users/stanislavspetkevics/.gradle/wrapper/dists/gradle-5.1.1-bin/90y9l8txxfw1s2o6ctiqeruwn/gradle-5.1.1/lib/groovy-all-1.0-2.5.4.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class,int)
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.vmplugin.v7.Java7$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
> Configure project :
ANDROID_HOME: /Applications/Unity/Hub/Editor/2022.2.2f1/PlaybackEngines/AndroidPlayer/SDK
MAVEN_REPOS: name=Google url=https://dl.google.com/dl/android/maven2/
MAVEN_REPOS: name=maven url=https://dl.google.com/dl/android/maven2/
MAVEN_REPOS: name=maven2 url=https://dl.google.com/dl/android/maven2/
MAVEN_REPOS: name=maven3 url=https://repo1.maven.org/maven2
MAVEN_REPOS: name=MavenLocal url=file:/Users/stanislavspetkevics/.m2/repository/
MAVEN_REPOS: name=MavenRepo url=https://repo.maven.apache.org/maven2/
PACKAGES_TO_COPY: androidx.activity:activity:1.2.4
PACKAGES_TO_COPY: androidx.activity:activity-ktx:1.1.0
TARGET_DIR: /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Assets/Plugins/Android
Resolution attempt 1: packages [androidx.activity:activity:1.2.4, androidx.activity:activity-ktx:1.1.0]
androidx.activity:activity conflicting due to package(s):
- androidx.activity:activity-ktx:1.1.0/androidx.activity:activity:[1.1.0]
- androidx.activity:activity:1.2.4
Resolution attempt: 1, conflicts detected: true, updated packages: true
Resolution attempt 2: packages [androidx.activity:activity:1.2.4+, androidx.activity:activity-ktx:1.1.0+]
androidx.activity:activity conflicting due to package(s):
- androidx.activity:activity-ktx:1.1.0+/androidx.activity:activity:[1.1.0]
- androidx.activity:activity:1.2.4+
Resolution attempt: 2, conflicts detected: true, updated packages: true
Resolution attempt 3: packages [androidx.activity:activity:1.2.+, androidx.activity:activity-ktx:1.1.+]
androidx.activity:activity conflicting due to package(s):
- androidx.activity:activity-ktx:1.1.+/androidx.activity:activity:[1.1.0]
- androidx.activity:activity:1.2.+
Resolution attempt: 3, conflicts detected: true, updated packages: true
Resolution attempt 4: packages [androidx.activity:activity:1.2+, androidx.activity:activity-ktx:1.1+]
androidx.activity:activity conflicting due to package(s):
- androidx.activity:activity-ktx:1.1+/androidx.activity:activity:[1.1.0]
- androidx.activity:activity:1.2+
Resolution attempt: 4, conflicts detected: true, updated packages: true
Resolution attempt 5: packages [androidx.activity:activity:1.+, androidx.activity:activity-ktx:1.+]
Resolution attempt: 5, conflicts detected: false, updated packages: false
version locked packages: []
non-version locked packages: [androidx.activity:activity:1.+, androidx.activity:activity-ktx:1.+]

> Task :copy_androidx.annotation.annotation-1.2.0.jar
> Task :copy_androidx.arch.core.core-common-2.2.0-alpha01.jar
> Task :copy_androidx.arch.core.core-runtime-2.2.0-alpha01.aar
> Task :copy_androidx.collection.collection-1.0.0.jar
> Task :copy_androidx.core.core-1.8.0.aar
> Task :copy_androidx.lifecycle.lifecycle-common-2.6.0-alpha04.jar
> Task :copy_androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04.aar
> Task :copy_androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04.aar
> Task :copy_androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04.aar
> Task :copy_androidx.versionedparcelable.versionedparcelable-1.1.1.aar
> Task :process_androidx.activity.activity-1.7.0-alpha03.aar
> Task :process_androidx.activity.activity-ktx-1.7.0-alpha03.aar
> Task :process_androidx.annotation.annotation-experimental-1.1.0.aar
> Task :process_androidx.concurrent.concurrent-futures-1.0.0.jar
> Task :process_androidx.core.core-ktx-1.2.0.aar
> Task :process_androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04.aar
> Task :process_androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04.aar
> Task :process_androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04.aar
> Task :process_androidx.savedstate.savedstate-1.2.0.aar
> Task :process_androidx.savedstate.savedstate-ktx-1.2.0.aar
> Task :process_androidx.tracing.tracing-1.0.0.aar
> Task :process_com.google.guava.listenablefuture-1.0.jar
> Task :process_org.jetbrains.annotations-13.0.jar
> Task :process_org.jetbrains.kotlin.kotlin-stdlib-1.7.21.jar
> Task :process_org.jetbrains.kotlin.kotlin-stdlib-common-1.7.21.jar
> Task :process_org.jetbrains.kotlin.kotlin-stdlib-jdk7-1.6.21.jar
> Task :process_org.jetbrains.kotlin.kotlin-stdlib-jdk8-1.6.21.jar
> Task :process_org.jetbrains.kotlinx.kotlinx-coroutines-android-1.6.4.jar
> Task :process_org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.6.4.jar

> Task :copyPackages
Copied artifacts:
androidx.activity.activity-1.7.0-alpha03.aar
androidx.activity.activity-ktx-1.7.0-alpha03.aar
androidx.annotation.annotation-1.2.0.jar
androidx.annotation.annotation-experimental-1.1.0.aar
androidx.arch.core.core-common-2.2.0-alpha01.jar
androidx.arch.core.core-runtime-2.2.0-alpha01.aar
androidx.collection.collection-1.0.0.jar
androidx.concurrent.concurrent-futures-1.0.0.jar
androidx.core.core-1.8.0.aar
androidx.core.core-ktx-1.2.0.aar
androidx.lifecycle.lifecycle-common-2.6.0-alpha04.jar
androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04.aar
androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04.aar
androidx.savedstate.savedstate-1.2.0.aar
androidx.savedstate.savedstate-ktx-1.2.0.aar
androidx.tracing.tracing-1.0.0.aar
androidx.versionedparcelable.versionedparcelable-1.1.1.aar
com.google.guava.listenablefuture-1.0.jar
org.jetbrains.annotations-13.0.jar
WARNING: Some conflicting dependencies were found.
The following dependency versions were modified:
androidx.activity:activity:1.2.4 --> androidx.activity:activity:1.+
androidx.activity:activity-ktx:1.1.0 --> androidx.activity:activity-ktx:1.+

Reporting analytics data: /androidresolver/resolve/gradle/androidxdetected?unityVersion=2022.2.2f1&unityPlatform=OSXEditor&installSource=unitypackage&version=1.2.175&scope= 'Android Resolver: Gradle Resolve: AndroidX detected'
Reporting analytics data: /androidresolver/resolve/gradle/enablejetifier/enable?unityVersion=2022.2.2f1&unityPlatform=OSXEditor&installSource=unitypackage&version=1.2.175&scope= 'Android Resolver: Gradle Resolve: Enable Jetifier'
Reporting analytics data: /androidresolver/resolve/gradle/processaars?numPackages=29&unityVersion=2022.2.2f1&unityPlatform=OSXEditor&installSource=unitypackage&version=1.2.175&scope= 'Android Resolver: Gradle Resolve: Process AARs'
Processing Assets/Plugins/Android/androidx.activity.activity-1.7.0-alpha03.aar
ProcessAar Assets/Plugins/Android/androidx.activity.activity-1.7.0-alpha03.aar
Extracting Assets/Plugins/Android/androidx.activity.activity-1.7.0-alpha03.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/oc9ssj8v.erj/androidx.activity.activity-1.7.0-alpha03
Processing Assets/Plugins/Android/androidx.activity.activity-ktx-1.7.0-alpha03.aar
ProcessAar Assets/Plugins/Android/androidx.activity.activity-ktx-1.7.0-alpha03.aar
Extracting Assets/Plugins/Android/androidx.activity.activity-ktx-1.7.0-alpha03.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/mrjltv8n.riu/androidx.activity.activity-ktx-1.7.0-alpha03
Processing Assets/Plugins/Android/androidx.annotation.annotation-1.2.0.jar
ProcessAar Assets/Plugins/Android/androidx.annotation.annotation-1.2.0.jar
Processing Assets/Plugins/Android/androidx.annotation.annotation-experimental-1.1.0.aar
ProcessAar Assets/Plugins/Android/androidx.annotation.annotation-experimental-1.1.0.aar
Extracting Assets/Plugins/Android/androidx.annotation.annotation-experimental-1.1.0.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/84jfxxl8.9m4/androidx.annotation.annotation-experimental-1.1.0
Processing Assets/Plugins/Android/androidx.arch.core.core-common-2.2.0-alpha01.jar
ProcessAar Assets/Plugins/Android/androidx.arch.core.core-common-2.2.0-alpha01.jar
Processing Assets/Plugins/Android/androidx.arch.core.core-runtime-2.2.0-alpha01.aar
ProcessAar Assets/Plugins/Android/androidx.arch.core.core-runtime-2.2.0-alpha01.aar
Extracting Assets/Plugins/Android/androidx.arch.core.core-runtime-2.2.0-alpha01.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/u1zf7ef0.jfm/androidx.arch.core.core-runtime-2.2.0-alpha01
Processing Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar
ProcessAar Assets/Plugins/Android/androidx.collection.collection-1.0.0.jar
Processing Assets/Plugins/Android/androidx.concurrent.concurrent-futures-1.0.0.jar
ProcessAar Assets/Plugins/Android/androidx.concurrent.concurrent-futures-1.0.0.jar
Processing Assets/Plugins/Android/androidx.core.core-1.8.0.aar
ProcessAar Assets/Plugins/Android/androidx.core.core-1.8.0.aar
Extracting Assets/Plugins/Android/androidx.core.core-1.8.0.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/34mel8vh.l64/androidx.core.core-1.8.0
Processing Assets/Plugins/Android/androidx.core.core-ktx-1.2.0.aar
ProcessAar Assets/Plugins/Android/androidx.core.core-ktx-1.2.0.aar
Extracting Assets/Plugins/Android/androidx.core.core-ktx-1.2.0.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/kknbn7u2.9a9/androidx.core.core-ktx-1.2.0
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.6.0-alpha04.jar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-common-2.6.0-alpha04.jar
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04.aar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04.aar
Extracting Assets/Plugins/Android/androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/ptfvuuxw.arj/androidx.lifecycle.lifecycle-livedata-core-2.6.0-alpha04
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04.aar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04.aar
Extracting Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/7bnk5ssw.pvq/androidx.lifecycle.lifecycle-runtime-2.6.0-alpha04
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04.aar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04.aar
Extracting Assets/Plugins/Android/androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/qw3hra2b.qmz/androidx.lifecycle.lifecycle-runtime-ktx-2.6.0-alpha04
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04.aar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04.aar
Extracting Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/spjuk3by.d03/androidx.lifecycle.lifecycle-viewmodel-2.6.0-alpha04
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04.aar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04.aar
Extracting Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/6ew9dxc5.m3m/androidx.lifecycle.lifecycle-viewmodel-ktx-2.6.0-alpha04
Processing Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04.aar
ProcessAar Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04.aar
Extracting Assets/Plugins/Android/androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/of9vor9u.ny1/androidx.lifecycle.lifecycle-viewmodel-savedstate-2.6.0-alpha04
Processing Assets/Plugins/Android/androidx.savedstate.savedstate-1.2.0.aar
ProcessAar Assets/Plugins/Android/androidx.savedstate.savedstate-1.2.0.aar
Extracting Assets/Plugins/Android/androidx.savedstate.savedstate-1.2.0.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/yjf4sxlz.nl4/androidx.savedstate.savedstate-1.2.0
Processing Assets/Plugins/Android/androidx.savedstate.savedstate-ktx-1.2.0.aar
ProcessAar Assets/Plugins/Android/androidx.savedstate.savedstate-ktx-1.2.0.aar
Extracting Assets/Plugins/Android/androidx.savedstate.savedstate-ktx-1.2.0.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/ue23ma85.6nr/androidx.savedstate.savedstate-ktx-1.2.0
Processing Assets/Plugins/Android/androidx.tracing.tracing-1.0.0.aar
ProcessAar Assets/Plugins/Android/androidx.tracing.tracing-1.0.0.aar
Extracting Assets/Plugins/Android/androidx.tracing.tracing-1.0.0.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/81elwaf1.9i8/androidx.tracing.tracing-1.0.0
Processing Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.1.aar
ProcessAar Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.1.aar
Extracting Assets/Plugins/Android/androidx.versionedparcelable.versionedparcelable-1.1.1.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/8vcick1w.loa/androidx.versionedparcelable.versionedparcelable-1.1.1
Processing Assets/Plugins/Android/com.google.guava.listenablefuture-1.0.jar
ProcessAar Assets/Plugins/Android/com.google.guava.listenablefuture-1.0.jar
Processing Assets/Plugins/Android/org.jetbrains.annotations-13.0.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.annotations-13.0.jar
Processing Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-1.7.21.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-1.7.21.jar
Processing Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-common-1.7.21.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-common-1.7.21.jar
Processing Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-jdk7-1.6.21.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-jdk7-1.6.21.jar
Processing Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-jdk8-1.6.21.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.kotlin.kotlin-stdlib-jdk8-1.6.21.jar
Processing Assets/Plugins/Android/org.jetbrains.kotlinx.kotlinx-coroutines-android-1.6.4.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.kotlinx.kotlinx-coroutines-android-1.6.4.jar
Processing Assets/Plugins/Android/org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.6.4.jar
ProcessAar Assets/Plugins/Android/org.jetbrains.kotlinx.kotlinx-coroutines-core-jvm-1.6.4.jar
Reporting analytics data: /androidresolver/resolve/gradle/processaars/success?numPackages=29&unityVersion=2022.2.2f1&unityPlatform=OSXEditor&installSource=unitypackage&version=1.2.175&scope= 'Android Resolver: Gradle Resolve: Process AARs Succeeded'

@256p
Copy link
Author

256p commented Jan 18, 2023

Hi @paulinon ,

I think that I found the root of the problem.
And so what I did was create 2 empty libraries with the following dependencies:

+--- com.example:lib-a:1.0.0
+--- com.example:lib-a:1.1.1
+--- com.example:lib-a:1.2.0-alpha

+--- com.example:lib-b:1.0.0
        \--- com.example:lib-a:[1.0.0]
+--- com.example:lib-b:1.2.0-alpha
        \--- com.example:lib-a:1.1.1

The key point here is using [ and ] for creating the exact version range.

Then I created the following XML for EDM4U:

<?xml version="1.0" encoding="UTF-8" ?>
<dependencies>
  <androidPackages>
    <repositories>
      <repository>repository</repository>
    </repositories>
    <androidPackage spec="com.example:lib-a:1.1.1"/>
    <androidPackage spec="com.example:lib-b:1.0.0"/>
  </androidPackages>
</dependencies>

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:

Running Gradle...

/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/gradlew --daemon -b "/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=/Applications/Unity/Hub/Editor/2022.2.2f1/PlaybackEngines/AndroidPlayer/SDK" "-PTARGET_DIR=/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Assets/Plugins/Android" "-PMAVEN_REPOS=file:////Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/repository" "-PPACKAGES_TO_COPY=com.example:lib-a:1.1.1;com.example:lib-b:1.0.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=7.1.2"
Executing command: /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/gradlew --daemon -b "/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" "-PANDROID_HOME=/Applications/Unity/Hub/Editor/2022.2.2f1/PlaybackEngines/AndroidPlayer/SDK" "-PTARGET_DIR=/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Assets/Plugins/Android" "-PMAVEN_REPOS=file:////Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/repository" "-PPACKAGES_TO_COPY=com.example:lib-a:1.1.1;com.example:lib-b:1.0.0" "-PUSE_JETIFIER=1" "-PDATA_BINDING_VERSION=7.1.2"

> Configure project :
ANDROID_HOME: /Applications/Unity/Hub/Editor/2022.2.2f1/PlaybackEngines/AndroidPlayer/SDK
MAVEN_REPOS: name=Google url=https://dl.google.com/dl/android/maven2/
MAVEN_REPOS: name=maven url=https://dl.google.com/dl/android/maven2/
MAVEN_REPOS: name=maven2 url=file:/Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/repository/
MAVEN_REPOS: name=MavenLocal url=file:/Users/stanislavspetkevics/.m2/repository/
MAVEN_REPOS: name=MavenRepo url=https://repo.maven.apache.org/maven2/
PACKAGES_TO_COPY: com.example:lib-a:1.1.1
PACKAGES_TO_COPY: com.example:lib-b:1.0.0
TARGET_DIR: /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Assets/Plugins/Android
Resolution attempt 1: packages [com.example:lib-b:1.0.0, com.example:lib-a:1.1.1]
com.example:lib-a conflicting due to package(s):
- com.example:lib-a:1.1.1
- com.example:lib-b:1.0.0/com.example:lib-a:[1.0.0]
Resolution attempt: 1, conflicts detected: true, updated packages: true
Resolution attempt 2: packages [com.example:lib-b:1.0.0+, com.example:lib-a:1.1.1+]
com.example:lib-a conflicting due to package(s):
- com.example:lib-a:1.1.1+
- com.example:lib-b:1.0.0+/com.example:lib-a:[1.0.0]
Resolution attempt: 2, conflicts detected: true, updated packages: true
Resolution attempt 3: packages [com.example:lib-b:1.0.+, com.example:lib-a:1.1.+]
com.example:lib-a conflicting due to package(s):
- com.example:lib-a:1.1.+
- com.example:lib-b:1.0.+/com.example:lib-a:[1.0.0]
Resolution attempt: 3, conflicts detected: true, updated packages: true
Resolution attempt 4: packages [com.example:lib-a:1.1+, com.example:lib-b:1.0+]
com.example:lib-a conflicting due to package(s):
- com.example:lib-a:1.1.+
- com.example:lib-b:1.0.+/com.example:lib-a:[1.0.0]
Resolution attempt: 3, conflicts detected: true, updated packages: true
Resolution attempt 4: packages [com.example:lib-a:1.1+, com.example:lib-b:1.0+]
com.example:lib-a conflicting due to package(s):
- com.example:lib-a:1.1+
- com.example:lib-b:1.0+/com.example:lib-a:[1.0.0]
Resolution attempt: 4, conflicts detected: true, updated packages: true
Resolution attempt 5: packages [com.example:lib-a:1.+, com.example:lib-b:1.+]
Resolution attempt: 5, conflicts detected: false, updated packages: false
version locked packages: []
non-version locked packages: [com.example:lib-a:1.+, com.example:lib-b:1.+]

> Task :process_com.example.lib-a-1.2.0-alpha.aar
> Task :process_com.example.lib-b-1.2.0-alpha.aar

> Task :copyPackages
Copied artifacts:
com.example.lib-a-1.2.0-alpha.aar
com.example.lib-b-1.2.0-alpha.aar

Modified artifacts:
com.example:lib-a:1.1.1 --> com.example:lib-a:1.+
com.example:lib-b:1.0.0 --> com.example:lib-b:1.+


BUILD SUCCESSFUL in 1s
3 actionable tasks: 3 executedWARNING: Some conflicting dependencies were found.
The following dependency versions were modified:
com.example:lib-a:1.1.1 --> com.example:lib-a:1.+
com.example:lib-b:1.0.0 --> com.example:lib-b:1.+

Reporting analytics data: /androidresolver/resolve/gradle/processaars?numPackages=2&unityVersion=2022.2.2f1&unityPlatform=OSXEditor&installSource=unitypackage&version=1.2.175&scope= 'Android Resolver: Gradle Resolve: Process AARs'
Processing Assets/Plugins/Android/com.example.lib-a-1.2.0-alpha.aar
ProcessAar Assets/Plugins/Android/com.example.lib-a-1.2.0-alpha.aar
Extracting Assets/Plugins/Android/com.example.lib-a-1.2.0-alpha.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/f3hms5s4.40t/com.example.lib-a-1.2.0-alpha
Processing Assets/Plugins/Android/com.example.lib-b-1.2.0-alpha.aar
ProcessAar Assets/Plugins/Android/com.example.lib-b-1.2.0-alpha.aar
Extracting Assets/Plugins/Android/com.example.lib-b-1.2.0-alpha.aar () to /Users/stanislavspetkevics/Desktop/unity-jar-resolver-android-issue/Temp/8tzsw5qn.uub/com.example.lib-b-1.2.0-alpha
Reporting analytics data: /androidresolver/resolve/gradle/processaars/success?numPackages=2&unityVersion=2022.2.2f1&unityPlatform=OSXEditor&installSource=unitypackage&version=1.2.175&scope= 'Android Resolver: Gradle Resolve: Process AARs Succeeded'

In contrast, the usual Gradle project for Android ignores the exact version range. Here are the same dependencies from the Gradle project:

dependencies {
    implementation 'com.example:lib-a:1.1.1'
    implementation 'com.example:lib-b:1.0.0'
}

Which resolved like so:

+--- com.example:lib-a:1.1.1
\--- com.example:lib-b:1.0.0
     \--- com.example:lib-a:[1.0.0] -> 1.1.1

And initially, this happened because for some reason android-ktx has the same exact version range defined. Here is pom: https://dl.google.com/dl/android/maven2/androidx/activity/activity-ktx/1.1.0/activity-ktx-1.1.0.pom

But why it took an hour to resolve for datadog and inmobi, I don't know. Maybe this leads to some inefficiency in the resolver loop.

@paulinon
Copy link
Collaborator

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.

@googlesamples googlesamples locked and limited conversation to collaborators Feb 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants