I am adding Github Workflow support to a work related project and am running into a dependency resolution issue that only appears in Github Workflow but not when running locally in Android Studio.
2022-09-27T21:16:36.1987186Z 2022-09-27T21:16:35.687+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2022-09-27T21:16:36.1987705Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
2022-09-27T21:16:36.1988055Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
2022-09-27T21:16:36.1988445Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
2022-09-27T21:16:36.1989005Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:dataBindingMergeDependencyArtifactsDevRelease'.
2022-09-27T21:16:36.1989532Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve all files for configuration ':app:devReleaseCompileClasspath'.
2022-09-27T21:16:36.1989985Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve com.<redacted>.android:core-kt:2.0.1.
2022-09-27T21:16:36.1990366Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Required by:
2022-09-27T21:16:36.1990737Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] project :app
2022-09-27T21:16:36.1991148Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Skipped due to earlier error
2022-09-27T21:16:36.1991661Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not resolve org.jetbrains.kotlinx:kotlinx-coroutines-core:1.5.+.
2022-09-27T21:16:36.1992242Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Required by:
2022-09-27T21:16:36.1992634Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] project :app
2022-09-27T21:16:36.1993050Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Skipped due to earlier error
2022-09-27T21:16:36.1993422Z 2022-09-27T21:16:35.688+0000 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
Unfortunately this is a private work repo so I had to redact one of the packages that is not resolving. I'm not sure how to begin debugging this as again it works in Android studio.
The command I am running is
gradlew testDevReleaseUnitTestCoverage
I did some searching around and found that it may be a Gradle version mismatch but have verified in my Gradle-wrapper.properties file I am setting distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
and I am seeing in the GitHub workflow log
2022-09-27T21:13:22.3166526Z Set executable permissions for: /home/runner/.gradle/wrapper/dists/gradle-7.0.2-bin/857tjihv64xamwrf0h14cai3r/gradle-7.0.2/bin/gradle
2022-09-27T21:13:22.6121675Z 2022-09-27T21:13:22.590+0000 [INFO] [org.gradle.internal.nativeintegration.services.NativeServices] Initialized native services in: /home/runner/.gradle/native
2022-09-27T21:13:22.7267255Z 2022-09-27T21:13:22.622+0000 [LIFECYCLE] [org.gradle.launcher.cli.WelcomeMessageAction]
2022-09-27T21:13:22.7268295Z 2022-09-27T21:13:22.622+0000 [LIFECYCLE] [org.gradle.launcher.cli.WelcomeMessageAction] Welcome to Gradle 7.0.2!
Which leads me to believe the two versions of Gradle being run are the same.
Any help on how to approach move forward with my debugging?
I will also add any other details as needed that don't divulge information about my company or the project.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.