2017-04-10 62 views
0

我想quickblox SDK的最新版本整合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

首先檢查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" 
     } 

我希望它會工作