sdk-for-android: ๐ Bug Report: Failed to resolve: com.squareup.okhttp3:okhttp-bom:4.10.0
๐ Reproduction steps
After adding โimplementation(โio.appwrite:sdk-for-android:4.0.0โ)โ to my build.gradle.kts
๐ Expected behavior
BUILD SUCCESSFUL
๐ Actual Behavior
Failed to resolve: com.squareup.okhttp3:okhttp-bom:4.10.0
๐ฒ Appwrite version
Appwrite Cloud
๐ป Operating system
Linux
๐งฑ Your Environment
Kotlin SDK
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
plugins {
alias(libs.plugins.androidApplication)
alias(libs.plugins.kotlinAndroid)
}
android {
namespace = "space.technet.assistant"
compileSdk = 34
defaultConfig {
applicationId = "space.technet.assistant"
minSdk = 26
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary = true
}
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
compose = true
}
composeOptions {
kotlinCompilerExtensionVersion = "1.4.3"
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
}
}
}
dependencies {
implementation(libs.core.ktx)
implementation(libs.lifecycle.runtime.ktx)
implementation(libs.activity.compose)
implementation(platform(libs.compose.bom))
implementation(libs.ui)
implementation(libs.ui.graphics)
implementation(libs.ui.tooling.preview)
implementation(libs.material3)
implementation(platform(libs.compose.bom))
implementation(libs.androidx.foundation.android)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.test.ext.junit)
androidTestImplementation(libs.espresso.core)
androidTestImplementation(platform(libs.compose.bom))
androidTestImplementation(libs.ui.test.junit4)
androidTestImplementation(platform(libs.compose.bom))
debugImplementation(libs.ui.tooling)
debugImplementation(libs.ui.test.manifest)
implementation(libs.androidx.navigation.compose)
implementation("io.appwrite:sdk-for-android:4.0.0")
//implementation("com.squareup.okhttp3:okhttp-bom:4.10.0")
}
๐ Have you spent some time to check if this issue has been raised before?
- I checked and didnโt find similar issue
๐ข Have you read the Code of Conduct?
- I have read the Code of Conduct
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 27 (3 by maintainers)
Just add these { exclude(group = โcom.squareup.okhttp3โ, module = โokhttp-bomโ) } after appwrite dependency declaration in your build.gradle. You also have to add okhttp to your dependencies.
Mine declaration uses version catalog, thats why it starts with โlibsโ
Issue could be avoided with excluding okhttp from appwrite library. But you have to add okhttp bom yourself.
Thank you for reporting the issue, we are looking into it and will resolve this soon.
๐ itโs 2:30 AM in India, and Iโm downgrading my AGP version, after investing half an hour on this
same issue with AGP version 8.2.1 i had to downgrade it to 8.1.4
You can go ahead and down your AGP version to 8.1.1. I think it will work fine. @JackuXL