question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] - Could not find com.github.canhub:android-image-cropper:4.1.0.

See original GitHub issue
repositories {
		google()
		mavenCentral()
		gradlePluginPortal()
		maven { url "https://jitpack.io" }
		maven { url "https://plugins.gradle.org/m2/" }
		maven { url "https://dl.bintray.com/kotlin/kotlin-eap" }
	}

I have several project with the same issue!

ext {android_image_cropper_version = "4.1.0"}

	// Android-Image-Cropper
	implementation "com.github.canhub:android-image-cropper:$android_image_cropper_version"

Gradle Sync works as expected and library seem to download perfectly no errors BUT: Upon Build->Rebuild Project the Error occurs

Further Investigation reveals in External Libraries “Gradle:com.github” does not exist - I can see al my other implemented Libraries there there fore Gradle is correct in NOT finding it! I am using distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip

Android Studio Bumblebee | 2021.1.1 Patch 1
Build #AI-211.7628.21.2111.8139111, built on February 1, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 12
Registry: external.system.auto.import.disabled=true, ide.instant.shutdown=false, ide.balloon.shadow.size=0
Non-Bundled Plugins: wu.seal.tool.jsontokotlin (3.7.2), org.jetbrains.kotlin (211-1.6.10-release-923-AS7442.40), com.developerphil.adbidea (1.6.4), de.ohmesoftware.parcelablegenerator (0.7.1), org.intellij.plugins.markdown (211.7142.37)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
AlessandroVendraminiDevelopercommented, Mar 15, 2022

I finally found the Solution: With Android Studio Bumblebee, you must make this steps:

  1. Add this code in build.gradle
buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.4"
        // Some dependencies
    }
}

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
  1. Add this code in settings.gradle
import org.gradle.api.initialization.resolve.RepositoriesMode

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        jcenter() // Warning: this repository is going to shut down soon
    }
}
rootProject.name = "AppName"
include ':app'

It works for me after that and I can Import the library inside XML

1reaction
TranHuy2709commented, Apr 13, 2022

I finally found the Solution: With Android Studio Bumblebee, you must make this steps:

  1. Add this code in build.gradle
buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.4"
        // Some dependencies
    }
}

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
  1. Add this code in settings.gradle
import org.gradle.api.initialization.resolve.RepositoriesMode

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        jcenter() // Warning: this repository is going to shut down soon
    }
}
rootProject.name = "AppName"
include ':app'

It works for me after that and I can Import the library inside XML

It solved my problem. Thank you so much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gradle Build Error: Could not find com.github.chrisbanes ...
I have tried to implement the simple example in the readme using Glide but I get this error: Could not find ...
Read more >
Could not find com.github.imperiumlabs:GeoFirestore-Android ...
I've solved this error by putting maven { url 'https://jitpack.io' } this line of code into settings.gradle (repositories) and removing the ...
Read more >
SpotBugs
Find bugs in Java Programs. Check it out on GitHub. SpotBugs is a program which uses static analysis to look for bugs in...
Read more >
Bug tracking & new features development by mastering ...
Milestones, Labels & Assignees. At some point, you're going to have many issues and you may find it hard to find a specific...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found