集成流程:
1、官网下载 *SDK + Demo源码
2、将Demo中examples下的ChatDemoUI3.0导入Android Studio,然后再将easeui作为module导入,使easeui作为ChatDemoUI3.0的依赖工程。
重点正式开始:
3.在自己的项目中,如步骤2,将easeui作为medule导入并作为依赖项目
4.此时可能报错如下:
警告或错误1: warning: string 'delete_target_uninstall_label' has no default translationin
解决方案:[参考1](https://zhidao.baidu.com/question/1830062383679887660.html)
报错2: duplicate XXX...
解决方案:[参考2](http://blog.csdn.net/chenqiuping_ls/article/details/53409297)
报错3:Test工程报错,原因为误删app build.gradle部分文件依赖部分,[参考](http://blog.csdn.net/pkandroid/article/details/61535978)
可能还有其他问题,同样参考[参考2](http://blog.csdn.net/chenqiuping_ls/article/details/53409297)
5.Clean,重新构建,OK
完整App build.gradle文件内容如下:
`
apply plugin: ‘com.android.application’
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "io.github.cuncaojin.cloudplay"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//use legacy for android 6.0
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//Optional compile for GCM (Google Cloud Messaging).
compile 'com.android.support:support-v4:25.3.0'
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support:cardview-v7:25.3.0'
compile 'com.android.support:recyclerview-v7:25.3.0'
compile 'com.google.code.gson:gson:2.7'
compile 'com.google.android.gms:play-services-gcm:10.2.1'
compile 'com.squareup.okhttp:okhttp:2.0.0'
testCompile 'junit:junit:4.12'
// 环信
compile project(':easeui')
compile files('libs/android-support-multidex.jar')
compile files('libs/bolts-tasks-1.4.0.jar')
compile files('libs/umeng-analytics-v5.2.4.jar')
compile files('libs/parse-android-1.13.0.jar')
compile files('libs/umeng-update-v2.6.0.1.jar')
}
`
参考
1、http://blog.csdn.net/chenqiuping_ls/article/details/53409297
2、https://zhidao.baidu.com/question/1830062383679887660.html