我想在我已经存在的Android应用程序中嵌入聊天功能。它已经包含了登录凭据。因此,我尝试将Quickblox添加到我现有的android项目中,该项目是从GitHub链接GitHub下载的
还需要在我现有的应用程序中添加GitHub 链接 中发布的q- my源代码吗?
或者,如果没有这个Q-交流源代码,我只能通过在我现有的应用程序中导入Quickblox来开发聊天功能吗?
这是我的项目的顶级build.gradle文件
//顶级构建文件,您可以在其中添加所有子项目/模块共有的配置选项。
buildscript {
repositories {
jcenter()
}
def qbSdkVersion = '3.2.0'
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'org.greenrobot:greendao-gradle-plugin:3.1.0'
compile "com.quickblox:quickblox-android-sdk-chat:$qbSdkVersion"
//include only necessary module dependency, all transitive modules will be included automatically
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url = "file://C:/Users/HP/Downloads/quickblox-android-sdk-releases-master"
// url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}这是模块级build.gradle
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.sensei.app"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
greendao {
schemaVersion 1
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:cardview-v7:24.0.+'
compile 'com.android.support:design:24.2.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'org.greenrobot:greendao:3.1.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.jakewharton:butterknife:8.4.0'
сompile "com.quickblox:quickblox-android-sdk-chat:$qbSdkVersion" //include only necessary module dependency, all transitive modules will be included automatically
сompile "com.quickblox:quickblox-android-sdk-content:$qbSdkVersion"
сompile "com.quickblox:quickblox-android-sdk-messages:$qbSdkVersion"
сompile "com.quickblox:quickblox-android-sdk-customobjects:$qbSdkVersion"
debugCompile 'com.facebook.stetho:stetho:1.4.1'
debugCompile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}发布于 2016-12-27 09:10:34
访问此链接以获得与QuickBlox的简单聊天功能集成
https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-chat
您需要在项目中为聊天功能添加代码,如一对一聊天或组聊天,以及以上示例中的所有代码。
https://stackoverflow.com/questions/41263914
复制相似问题