Paolo Secchettin
Paolo Secchettin

Reputation: 1

Could not find me.sudar:zxing-orient:2.1.1

I can't compile on android studio Koala, for the follow errors:

`

Configuration cache state could not be cached: field __librarySourceSets__ of task :app:mapDebugSourceSetPaths of type com.android.build.gradle.tasks.MapSourceSetPathsTask: error writing value of type 'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection'

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find me.sudar:zxing-orient:2.1.1. Searched in the following locations: - https://jcenter.bintray.com/me/sudar/zxing-orient/2.1.1/zxing-orient-2.1.1.pom - https://maven.google.com/me/sudar/zxing-orient/2.1.1/zxing-orient-2.1.1.pom Required by: project :app

Possible solution:

'

Buid.gradle:

implementation 'me.sudar:zxing-orient:2.1.1@aar'


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'me.sudar:zxing-orient:2.1.1@aar'
    implementation 'com.amazonaws:aws-android-sdk-mobileanalytics:2.2.9'
    implementation 'com.amazonaws:aws-android-sdk-core:2.2.+'
    implementation 'com.amazonaws:aws-android-sdk-s3:2.2.+'
    implementation 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
    implementation 'com.amazonaws:aws-android-sdk-ddb-mapper:2.2.+'
    implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
    implementation 'com.amazonaws:aws-android-sdk-sns:2.2.+'
    //implementation 'ch.acra:acra:4.9.0'
    testImplementation 'junit:junit:4.12'

Java program: import error on me.sudar:

import me.sudar.zxingorient.Barcode;
import me.sudar.zxingorient.ZxingOrient;
import me.sudar.zxingorient.ZxingOrientResult;

Buid.Gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:8.5.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Any Idea? Tahnk's Paolo

Upvotes: 0

Views: 96

Answers (1)

ondreo
ondreo

Reputation: 1

The me.sudar:zxing-orient:2.1.1 library is stored on Maven Central repository, so you should probably add mavenCentral() to your repositories definition.

Also, you have redundant invokation of "Google" repository. The google() part should be enough for that, so you can delete the maven {... part.

So the repositories part would look like this:

repositories {
        jcenter()
        google()
        mavenCentral()
    }

Also, as the jcenter() repository is deprecated since 2021 and now redirecting to Maven Central, consider removing it from your repositories declaration, so the repositories block would look like this:

repositories {
        google()
        mavenCentral()
    }

Upvotes: 0

Related Questions