简体   繁体   English

Android Studio Gradle错误:无法解决:com.quickblox:quickblox-android-sdk-core:2.5.1

[英]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. 我目前正在涉足Android开发,并且有一个Android Studio项目,正在尝试将QuickBlox sdk添加到我的项目中。 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. 通过一些研究,我发现我可能不需要gradle文件中的mavenCentral()位,因为所提供的jcentral()行是等效的,因此我仅将以下部分添加到了gradle文件中。

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'. 无法解析配置':app:_debugCompile'的所有依赖项。 Could not resolve com.quickblox:quickblox-android-sdk-core:2.5.1. 无法解析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. 必需:Wext:app:unspecified无法解析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 '. 无法获取资源' 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 '. 无法获取' 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. 我在这里发现了很多类似的问题,并且尝试了一些建议的答案,包括将github证书添加到java证书存储区并重新安装JDK,但这似乎没有效果。 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. 您必须在应用程序级别(顶级)build.gradle文件中包含此参考。 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. 注意:您的url值写在jcenter标记中。 Just replace it to the maven { url .. } tag and sync your project. 只需将其替换为maven {url ..}标签并同步您的项目即可。

Hope it will help you. 希望对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Studio:无法解析:com.leaking.slideswitch:app:1.0.0 - Android Studio:failed to resolve:com.leaking.slideswitch:app:1.0.0 Gradle和Android:无法解析依赖项com.android.support - Gradle and Android: Could not resolve dependencies com.android.support Android Studio无法解决Gradle依赖关系 - Android Studio cant resolve gradle dependencies Gradle 无法解决 Android Studio 中的依赖关系 - Gradle fails to resolve dependencies in Android Studio “找不到 com.android.tools.build:gradle:2.2.0。” android 工作室中的错误 - “Could not find com.android.tools.build:gradle:2.2.0.” error in android studio Jitpack:无法使用示例库(Android Studio)解决 - Jitpack: Failed to resolve with Example Library (Android Studio) Android Studio 2.3.3:即使使用Maven也无法解析:com.google.android.gms:play-services-ads:11.8.0 - Android Studio 2.3.3: Failed to resolve: com.google.android.gms:play-services-ads:11.8.0 even with Maven Android Studio gradle sync无法找到库 - Android Studio gradle sync failed to find library 无法在Android Studio上使用Gradle安装Kontakt Android SDK - Can't install Kontakt Android SDK using Gradle on Android Studio gradle 构建错误:无法解析 com.android.support:appcompat-v7:28.0.0 - gradle build error: Could not resolve com.android.support:appcompat-v7:28.0.0
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM