Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Resolve the Dependency Although I am providing my correct user id and token key #12

Open
Dev-Bit64 opened this issue Feb 10, 2021 · 11 comments

Comments

@Dev-Bit64
Copy link

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve com.cuberto:liquid-swipe:1.0.0.
Show Details
Affected Modules: app

@PrivyXe
Copy link

PrivyXe commented Apr 16, 2021

I'm making the same mistake. Did you solve the problem?

@akashchaudhary-git
Copy link

make sure to add github.properties file at the root level of your android project.
add both
gpr.usr= (your user id - goto https://api.github.com/users/your_git_username)
gpr.key = (here paste the token generated from Settings/Developer settings/Personal access tokens/Generate new token - check the read:packages before generating token)

@zeoharlem
Copy link

the problem is that https://maven.pkg.github.com/Cuberto/liquid-swipe-android which loads the package is showing error 404 page not found... They need to check this link

@akashchaudhary-git
Copy link

Here is my code after generating my token and creating github.properties file to the root level.

i have added this code in build.gradle(Project: PROJECT_NAME) file

  allprojects {
    repositories {
        google()
        jcenter()
        def githubProperties = new Properties()
        githubProperties.load(new FileInputStream(rootProject.file("github.properties")))
        repositories {
            maven {
                name = "GitHubPackages"
                url = uri("https://maven.pkg.github.com/Cuberto/liquid-swipe-android")
                credentials {
                    /** Create github.properties in root project folder file with
                     ** gpr.usr=GITHUB_USER_ID & gpr.key=PERSONAL_ACCESS_TOKEN
                     ** Or set env variable GPR_USER & GPR_API_KEY if not adding a properties file**/
                    username = githubProperties['gpr.usr'] ?: System.getenv("GPR_USER")
                    password = githubProperties['gpr.key'] ?: System.getenv("GPR_API_KEY")
                }
            }
        }
    }
}

after that i've added the dependency to my build.gradle(Module: PROJECT_NAME) file

dependencies {
.
.
implementation 'com.cuberto:liquid-swipe:1.0.0'
}

Note: I've minimum sdk set to 21 which is Android 5 API

@Udhayarajan
Copy link

Refer my answer in stackoverflow

@VIkash2601
Copy link

If you are building your application with Android SDK 30, it doesn't recognize it. So switch to Android SDK 29 and you will be able to use it.

@Udhayarajan
Copy link

If you are building your application with Android SDK 30, it doesn't recognize it. So switch to Android SDK 29 and you will be able to use it.

I had added support to Android 11 too.
Check here

@VIkash2601
Copy link

If you are building your application with Android SDK 30, it doesn't recognize it. So switch to Android SDK 29 and you will be able to use it.

I had added support to Android 11 too.
Check here

Thanks got resolved the error. But when I'm using the same with Java I implemented these libraries too:

implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
implementation 'androidx.core:core:1.5.0'
implementation 'androidx.core:core-ktx:1.5.0'

But getting this warning Plugin version (null) is not the same as library version (1.4.32) . Can you help me with this?

@akashchaudhary-git
Copy link

If you are building your application with Android SDK 30, it doesn't recognize it. So switch to Android SDK 29 and you will be able to use it.

I had added support to Android 11 too.
Check here

Thanks got resolved the error. But when I'm using the same with Java I implemented these libraries too:

implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
implementation 'androidx.core:core:1.5.0'
implementation 'androidx.core:core-ktx:1.5.0'

But getting this warning Plugin version (null) is not the same as library version (1.4.32) . Can you help me with this?

It's maybe related to the Kotlin Plugin.
Have you installed Kotlin Plugin for android studio ?

@Udhayarajan
Copy link

If you are building your application with Android SDK 30, it doesn't recognize it. So switch to Android SDK 29 and you will be able to use it.

I had added support to Android 11 too.
Check here

Thanks got resolved the error. But when I'm using the same with Java I implemented these libraries too:

implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'
implementation 'androidx.core:core:1.5.0'
implementation 'androidx.core:core-ktx:1.5.0'

But getting this warning Plugin version (null) is not the same as library version (1.4.32) . Can you help me with this?

Starting from Kotlin 1.4 dependency on the standard library added by default

So you can remove
'org.jetbrains.kotlin:kotlin-stdlib:1.4.32'

@YashSharmaas
Copy link

YashSharmaas commented Mar 4, 2023

#Hey! @Udhayarajan I referred your solution to my Latest Android Studio(Electric Eel) with my compile SDK version is 33, I've been facing this issue last 5 days but can't solve it, I applied everything on my code as you say but warning still which is ->

Failed to resolve: com.github.Udhayarajan:liquid-swipe-android:1.0.1
Show in Project Structure dialog
Affected Modules: app

Please I'm Requesting to you provide a better solution to get rid of this issue.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants