-
Notifications
You must be signed in to change notification settings - Fork 119
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
Circular Reference during mergeExtDex on versions 2.14.5 to 2.14.11 on Android Studio Hedgehog | 2023.1.1 Patch #2731
Comments
Hello, |
@dgrdinh Are you manually adding AWS Kotlin SDK dependencies?
Our latest releases use: This is the likely source of the issue. Please look at upgrading Kotlin SDK dependencies to match. |
@ankpshah I am using kotlinVersion 1.8.22 when I see the problem @tylerjroach I did not find any references to smithy in the gradle files. As far as I can tell, I only added these:
I can check the entire dependency tree to see if something else is adding that? (EDIT: I checked the dependency trees and the only references to smithy or telemetry are part of: com.amplifyframework:aws-auth-cognito:2.14.11 |
I checked the dependencies trees, and the only ones that depend on smithy or anything with telemetry is: com.amplifyframework:aws-auth-cognito:2.14.11 So its nothing external, and we didn't add it ourselves. |
seeing this issue when trying to build project with
or
both options given by the amplify docs this is the error im getting during mergeExtDex
|
Another member on our team is following up with a more detailed investigation. Can you share more of your dependency tree. I see this version in my tree: I'm confused as to why Can you please update to the latest version of Amplify, clean your project, resync, and re-check the dependency graph? |
Thanks for the info @rafaelmonroy. I've been able to reproduce this issue with the following setup: Gradle 7.5 + AGP 7.4.0 This issue is covered in this Google Tracker bug which suggests that the R8 4.0 dexer only supports Kotlin metadata up to 1.8. Since Amplify 2.14.5 increased its Kotlin language level to 1.9 this is what introduces the error. The bug tracker issue indicates that a newer R8 version included in Android Gradle Plugin 8.0 resolves this problem. I've verified that the error does not occur when using Gradle 8.0+ (and AGP 8.0.0+), so that is the best way to resolve this error. Please be sure to reference the AGP 8.0 Release Notes when making this upgrade. Another thing you could do would be to disable core library desugaring if that is not necessary for your app (which is generally when your minSDK is 26+). The error does not occur if the application does not use desugaring. |
@mattcreaser thanks for the feedback, I can confirm that updating gradle to the recommended version removes the bug I mentioned |
@rafaelmonroy Glad to hear it! @dgrdinh please let us know if that works for you. |
@mattcreaser Yes, upgrading to gradle 8 worked for me as well. Thanks everyone. |
Closing this issue but please open a new one if further issues are encountered! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
Authentication
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
No response
Describe the bug
If I build our android app with versions greater than 2.14.4, I am seeing the following error:
Caused by: [CIRCULAR REFERENCE: com.android.tools.r8.kotlin.H]
Cause 27: org.gradle.api.internal.artifacts.transform.TransformException: Failed to transform telemetry-defaults-jvm-0.28.1.jar (aws.smithy.kotlin:telemetry-defaults-jvm:0.28.1) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=false, dexing-is-debuggable=true, dexing-min-sdk=26, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
Reproduction steps (if applicable)
On Android studio Hedgehog | 2023.1.1 Patch 2, Build app with the following:
implementation 'com.amplifyframework:aws-auth-cognito:2.14.5'
implementation 'com.amplifyframework:core-kotlin:2.14.5'
Notice the error during mergeExtDex
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: