Fátima Ramone
Fátima Ramone

Reputation: 13

Could not find com.squareup.moshi:moshi-kotlin-reflect:1.15.1

I'm currently facing a build failure in my Android project that uses Kotlin DSL with a version.toml file for dependency management. During the build process, I encounter multiple failures related to the dependency com.squareup.moshi:moshi-kotlin-reflect:1.15.1. The error messages indicate that the build system cannot find the specified dependency in the following repositories:

https://dl.google.com/dl/android/maven2/com/squareup/moshi/moshi-kotlin-reflect/1.15.1/moshi-kotlin-reflect-1.15.1.pom https://repo.maven.apache.org/maven2/com/squareup/moshi/moshi-kotlin-reflect/1.15.1/moshi-kotlin-reflect-1.15.1.pom Here are some relevant details:

I'm using AGP version 8.5.2.

I have confirmed that the dependency moshi-kotlin-reflect should be available in the repositories mentioned. I've tried running the build with --stacktrace, --info, and --debug options, but the errors persist. Here are some of the errors from the build log:

arduino Copy code Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find com.squareup.moshi:moshi-kotlin-reflect:1.15.1. I would appreciate any guidance on how to resolve this dependency issue or any steps I can take to troubleshoot further.

THis is the code :

[versions]

moshi = "1.15.1"

[libraries]

moshi-kotlin-v1151 = { module = "com.squareup.moshi:moshi- 
kotlin", version.ref = "moshi" }
okhttp = { group = "com.squareup.okhttp3", name = "okhttp", 
version.ref = "okhttp" }
okhttp-logging = { group = "com.squareup.okhttp3", name = 
"logging-interceptor", version.ref = "okhttp" }
moshi = { group = "com.squareup.moshi", name = "moshi", 
version.ref = "moshi" }
moshi-kotlin-reflect = { group = "com.squareup.moshi", name = 
"moshi-kotlin-reflect", version.ref = "moshi" }        

the graddle file :

        implementation(libs.moshi)
        implementation(libs.moshi.kotlin.reflect)
        implementation(libs.moshi.kotlin.v1151)

Thank you!

Upvotes: 0

Views: 68

Answers (0)

Related Questions