Skip to content

Snappy1

  • Home
  • Android
  • What
  • How
  • Is
  • Can
  • Does
  • Do
  • Why
  • Are
  • Who
  • Toggle search form

[FIXED] android – Could not resolve all files for configuration ‘:app:debugCompileClasspath’. when trying to implement image picker library

Posted on November 11, 2022 By

Solution 1 :

You need to add jitpack to allprojects:

buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.4"
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.2"
        classpath 'com.google.gms:google-services:4.3.10'

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

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

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

ext {
    roomVersion = '2.4.2'
    coroutines = '1.4.3'
}

After that you most probably would have gradle dep resolution issue. To fix it you would need to delete dependencyResolutionManagement in settings.gradle

Or you can keep dependencyResolutionManagement and add maven { url ‘https://jitpack.io’ } directly there instead of repositories in root gradle file. This is preferable way to do

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
    }
}

Problem :

I am trying to use a library that can choose images from gallery, but i am having the following error. Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ‘:app: debugCompileClasspath’.

The library that I am using is :
implementation ‘com.github.esafirm.android-image-picker:imagepicker:2.4.5’

my build gradle file :

    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id "androidx.navigation.safeargs"

}

android {
    compileSdk 32

    defaultConfig {
        applicationId "application name"
        minSdk 26
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled 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'
    }
    dataBinding {
        enabled = true
    }

}

kapt {
    generateStubs = true
}

dependencies {
    implementation 'androidx.room:room-common:2.4.2'
    def daggerVersion = '2.21'

    implementation 'androidx.core:core-ktx:1.7.0'
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.5.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.1'

    //navigation
    implementation 'androidx.navigation:navigation-fragment-ktx:2.4.2'
    implementation 'androidx.navigation:navigation-ui-ktx:2.4.2'
    implementation "androidx.fragment:fragment-ktx:1.4.1"

    //Lifecycle ViewModel and LiveData
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
    implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.3.1"

    // Dagger dependencies

    implementation 'com.google.dagger:dagger:' + daggerVersion
    implementation 'com.google.dagger:dagger-android:' + daggerVersion
    implementation 'com.google.dagger:dagger-android-support:' + daggerVersion
    kapt 'com.google.dagger:dagger-android-processor:' + daggerVersion
    kapt 'com.google.dagger:dagger-compiler:' + daggerVersion

    //BlurView
    implementation 'com.eightbitlab:blurview:1.6.6'

    //SDP - a scalable size unit
    implementation 'com.intuit.sdp:sdp-android:1.0.6'

    //FlexBoxLayout
    implementation 'com.google.android.flexbox:flexbox:3.0.0'

    //View Pager dots
    implementation 'com.tbuonomo:dotsindicator:4.3'

    //Retrofit
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

    // Room
    def roomVersion = "2.4.0"
    implementation "androidx.room:room-runtime:$rootProject.roomVersion"
    kapt "androidx.room:room-compiler:$rootProject.roomVersion"
    implementation "androidx.room:room-ktx:$rootProject.roomVersion"
    testImplementation "androidx.room:room-testing:$rootProject.roomVersion"

    // Coroutines
    api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$rootProject.coroutines"
    api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$rootProject.coroutines"

    //Facebook SDK
    implementation 'com.facebook.android:facebook-login:12.3.0'

    //Google Services
    implementation 'com.google.android.gms:play-services-auth:20.2.0'

    //Glide
    implementation 'com.github.bumptech.glide:glide:4.13.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.13.0'

    //View More TextView
    implementation "it.mike5v:viewmore-textview:1.1.3"
    
    //Tooltip
    implementation 'com.tomergoldst.android:tooltips:1.0.10'

    //EasyPermissions
    implementation 'pub.devrel:easypermissions:1.1.3'

    //Rounded image
    implementation 'com.makeramen:roundedimageview:2.3.0'

    implementation("org.greenrobot:eventbus:3.3.1")

    //Image Picker
//    implementation 'com.github.esafirm:android-image-picker:3.0.0-beta1'

    implementation 'com.github.esafirm.android-image-picker:imagepicker:2.4.5'
}

My build gradle project file :

buildscript {
    repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
    }
    dependencies {
        classpath "com.android.tools.build:gradle:7.0.4"
        classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21'
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.4.2"
        classpath 'com.google.gms:google-services:4.3.10'

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

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

ext {
    roomVersion = '2.4.2'
    coroutines = '1.4.3'
}

Comments

Comment posted by flutra

Thank you a lot! Your response helped me, it resolved my error 🙂

READ  [FIXED] java - Passing countdown timer value to next activity
Powered by Inline Related Posts

Android Tags:android, gradle, kotlin

Post navigation

Previous Post: [FIXED] java – is permission needed when choosing image from gallery on android?
Next Post: [FIXED] Android Java: How to get component in a custom view? (Trying to access components via findByViewId and get null)

Related Posts

[FIXED] android studio – I am getting red lines under my flutter code but the code is perfectly functioning and there is no error Android
[FIXED] android – adb connect show : cannot connect to 192.168.1.35:5555: An attempt was made to access a socket in a way forbidden by its access permissions. (10013) Android
[FIXED] How do I force android WiFi Direct group owner to use 2.4 GHz instead of 5 GHz Android
[FIXED] android – How to set translation or margin to child and avoid parent’s paddings Android
[FIXED] java – setDisplayHomeAsUpEnabled not working in one of my Activities but everywhere else it does work Android
[FIXED] android – retrofit fails to parse inner json objects Android

Archives

  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuándo
  • ¿Cuántas
  • ¿Cuánto
  • ¿Qué
  • Android
  • Are
  • At
  • C'est
  • Can
  • Comment
  • Did
  • Do
  • Does
  • Est-ce
  • Est-il
  • For
  • Has
  • Hat
  • How
  • In
  • Is
  • Ist
  • Kann
  • Où
  • Pourquoi
  • Quand
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welchen
  • Welcher
  • Welches
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Who's
  • Why
  • Wie
  • Will
  • Wird
  • Wo
  • Woher
  • you can create a selvedge edge: You can make the edges of garter stitch more smooth by slipping the first stitch of every row.2022-02-04
  • you really only need to know two patterns: garter stitch

Recent Posts

  • What are the main features of Islamic education?
  • Is the Jeep 4xe worth it?
  • How does the ringer work on cast iron?
  • What is the biggest size interior door?
  • Is blue raspberry an original Jolly Rancher flavor?

Recent Comments

No comments to show.

Copyright © 2023 Snappy1.

Powered by PressBook Grid Dark theme