yuriy-budiyev / code-scanner

Code scanner library for Android, based on ZXing
MIT License
1.09k stars 266 forks source link

Failed to resolve: com.budiyev.android:code-scanner:2.3.2 #170

Open haqim007 opened 1 year ago

haqim007 commented 1 year ago
Screenshot 2022-11-17 at 15 56 19

When I reset/invalidate caches of android studio and rebuild the app, I found this error.

here is my build.gradle


buildscript {
    ext {
        kotlin_version = '1.6.21'
        code_scanner_version = "2.3.2"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.2.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

}

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
faridsavarudin commented 1 year ago

me also got this error

BennyDanielT commented 1 year ago

Actually, Scratch that. Ensure that the following lines of code are present in your <settings.gradle> file.

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

This will resolve the dependency issue.

JonathanAJ commented 1 year ago

implementation 'com.github.yuriy-budiyev:code-scanner:2.3.2'

haqim007 commented 1 year ago

implementation 'com.github.yuriy-budiyev:code-scanner:2.3.2'

still got the error

gianpaolof commented 3 months ago

same here. I need to use jcenter:

dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() jcenter() } }