简体   繁体   中英

Android Studio Gradle Error:Failed to resolve: com.quickblox:quickblox-android-sdk-core:2.5.1

I'm dabbling in Android development currently and I have an Android Studio project which I am trying to add the QuickBlox sdk to my project. I've tried following the instructions provided but found it did not work. With some research I found that I probably didn't need the mavenCentral() bit in the gradle file as the provided jcentral() lines were the equivalents and so I have only added the following sections to my gradle files.

allprojects {
repositories {
    jcenter()
    jcenter {
        url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
    }
}

However when I run this I get the error:

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not resolve com.quickblox:quickblox-android-sdk-core:2.5.1. Required by: Wext:app:unspecified Could not resolve com.quickblox:quickblox-android-sdk-core:2.5.1. Could not get resource ' https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/com/quickblox/quickblox-android-sdk-core/2.5.1/quickblox-android-sdk-core-2.5.1.pom '. Could not GET ' https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/com/quickblox/quickblox-android-sdk-core/2.5.1/quickblox-android-sdk-core-2.5.1.pom '. peer not authenticated

I have found lots of similar questions on here and I have tried some of the suggested answers including adding the github certificate to the java certificate store and reinstalling the JDK but it seems to have no effect. I'm not running through a proxy.

Can anyone point me in the right direction?

You have to include this reference at the app level (top level) build.gradle file. Just add following thing:

allprojects {
    repositories {
        jcenter()

        maven {
            url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
        }
    }
}

Note: Your url value is written in jcenter tag. Just replace it to the maven { url .. } tag and sync your project.

Hope it will help you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM