Gradle import failed
nick-doze opened this issue · 8 comments
Prerequisites
- Put an X between the brackets on this line if you have done all of the following:
- Read carefully README: https://github.com/tbruyelle/RxPermissions#rxpermissions
- Checked that your issue isn't already filed: https://github.com/tbruyelle/RxPermissions/issues
Issue description
[A clear and concise description of what the bug is.]
Cannot import from maven repository
Actual behavior
[A clear and concise description of what actually happened.]
Failed to resolve: com.github.tbruyelle:rxpermissions:0.12
Expected behavior
[A clear and concise description of what you expected to happen.]
Gradle sync complete
Steps To Reproduce
Steps to reproduce the behavior:
- [First Step] add implementation on gradle file
- [Second Step] Sync
- [Result] Failed to resolve
Lib Version
0.12
@nick-doze did you solve this ?
@ahmedsalemelzeiny nope…. Still same…
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Is admins gonna do anything about this?
`plugins {
id("com.android.application")
id("kotlin-android")
id("androidx.navigation.safeargs.kotlin")
id("org.jetbrains.kotlin.kapt")
}
android {
compileSdk = Dependencies.Config.compileSdk
buildToolsVersion = Dependencies.Config.buildToolsVersion
defaultConfig {
applicationId = Dependencies.Config.applicationId
minSdk = Dependencies.Config.minSdk
targetSdk = Dependencies.Config.targetSdk
versionCode = 1
versionName = "1.0.1"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
debug {
isMinifyEnabled = false
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
buildFeatures {
viewBinding = true
dataBinding = true
}
}
dependencies {
implementation(project(path = ":data"))
implementation(dependencyNotation = Dependencies.Google.material)
implementation(dependencyNotation = Dependencies.AndroidX.coreKtx)
implementation(dependencyNotation = Dependencies.AndroidX.appCompat)
implementation(dependencyNotation = Dependencies.AndroidX.constraintLayout)
implementation(dependencyNotation = Dependencies.AndroidX.swipeRefresh)
implementation(dependencyNotation = Dependencies.AndroidX.recyclerView)
implementation(dependencyNotation = Dependencies.AndroidX.cardView)
implementation(dependencyNotation = Dependencies.AndroidX.viewModel)
implementation(dependencyNotation = Dependencies.AndroidX.liveData)
implementation(dependencyNotation = Dependencies.AndroidX.runtime)
implementation(dependencyNotation = Dependencies.AndroidX.java8)
implementation(dependencyNotation = Dependencies.Network.ktorAndroid)
implementation(dependencyNotation = Dependencies.AndroidX.navigationFragment)
implementation(dependencyNotation = Dependencies.AndroidX.navigationUiKtx)
implementation(dependencyNotation = Dependencies.ViewBinding.viewBindingDelegate)
implementation(dependencyNotation = Dependencies.ImageLoader.coil)
implementation(dependencyNotation = Dependencies.Koin.koin)
implementation(dependencyNotation = Dependencies.Kotlin.coroutinesCore)
implementation(dependencyNotation = Dependencies.Kotlin.coroutinesAndroid)
//RxJava +
implementation("io.reactivex.rxjava3:rxandroid:3.0.0")
implementation("io.reactivex.rxjava3:rxjava:3.0.4")
implementation("com.github.tbruyelle:RxPermissions:0.12")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.squareup.retrofit2:retrofit:2.9.0")
implementation("com.squareup.okhttp3:logging-interceptor:3.11.0")
implementation("de.hdodenhof:circleimageview:3.1.0")
testImplementation(dependencyNotation = Dependencies.Test.junit)
androidTestImplementation(dependencyNotation = Dependencies.Test.junitExt)
androidTestImplementation(dependencyNotation = Dependencies.Test.espresso)
}`
Results in "Failed to resolve: com.github.tbruyelle:RxPermissions:0.12"
Is smth wrong with configuration? @tbruyelle or with build of a library?
I struggled with this for an hour. Turns out there's a dependencyResolutionManagement
block in the settings.gradle
file that I had to add the jitpack repository to as well. So add it to your project build.gradle
file like normal:
buildscript {
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // <---- Add here
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.3"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0"
}
}
But then also add it to the settings.gradle
file as well:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' } // <---- Add here as well
jcenter() // Warning: this repository is going to shut down soon
}
}
Hi
I add
jcenter() in project build
and
implementation 'com.jakewharton.rxbinding4:rxbinding:4.0.0'
in app build
still not working now