quickblox新的sdk集成

时间:2017-04-10 16:30:48

标签: android quickblox

我正在尝试整合quickblox sdk的最新版本

我已将这些行添加到我的gradle文件

repositories {

jcenter()
flatDir {
    dirs 'libs'
}
maven {
    url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
} 

还要添加

сompile 'com.quickblox:quickblox-android-sdk-chat:3.3.1'
сompile 'com.quickblox:quickblox-android-sdk-content:3.3.1'
сompile 'com.quickblox:quickblox-android-sdk-messages:3.3.1'

现在尝试同步gradle文件时出现以下错误

    Error:(151, 0) Gradle DSL method not found: 'сompile()'
Possible causes:<ul><li>The project 'app' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
<a href="fixGradleElements">Upgrade plugin to version 2.3.1 and sync project</a></li><li>The project 'app' may be using a version of Gradle that does not contain the method.
<a href="openGradleSettings">Gradle settings</a></li><li>The build file may be missing a Gradle plugin.
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li>
请问有人告诉我,问题是什么?

1 个答案:

答案 0 :(得分:1)

首先检查android studio中的sdk管理器是否有更新,比如gradle。 然后更改gradle文件中的代码并同步它。

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

maven {
            url= "file://Users/igor/workspace/quickblox/quickblox-android-sdk-releases-master"
        }

我希望它会起作用