1 下载sdk3.1.5后,在examples下找到easeui
2 将build.gradle删除(这一点非常重要,因为没有删除这个文件,后面出现的冲突浪费了我三四天时间)
3 在examples-ChatDemoUI3.0找到libs
4 在你的 (注意是主modules) 主modules-main下创建jniLibs文件夹,把demo中的jar包全部父之过去
5 之后就是导入easeui了(注意:确认build.gradle已经删除)
接下来是添加依赖,选择菜单栏上Project Structure,找到自己的工程,在Dependencies找到绿色的“+”,选择第三个“Module dependency”
6 导入easeui后发现他自动生成的build.gradle,这时才是我们需要的,将easeui的v4版本提升到23
compile'com.android.support:support-v4:23.+'
7 这时应该编译通过了,有些机子运行发现以下问题
java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.xxx.xxx/files/instant-run/dex/slice-support-annotations-24.1.0_ce9c5697cabea4565e89d9bb7a81deef74f26296-classes.dex", dex file "/data/data/com.xxx
如果遇到UnsatisfiedLinkError的问题,则在easeUI依赖库-jniLibs创建armeabi-v7a,然后将armeabi的.so文件拷贝一份进去即可。
之后你就可以根据你的需要进行自定义了,可以参考ChatDemoUI3.0,里面的逻辑很齐全了
![](https://i-blog.csdnimg.cn/blog_migrate/346f9999edbccbfda5d6ffbe74947393.webp?x-image-process=image/format,png)
2 将build.gradle删除(这一点非常重要,因为没有删除这个文件,后面出现的冲突浪费了我三四天时间)
![](https://i-blog.csdnimg.cn/blog_migrate/34a6fe6e6eb6f7bd3836b89855791a69.webp?x-image-process=image/format,png)
3 在examples-ChatDemoUI3.0找到libs
![](https://i-blog.csdnimg.cn/blog_migrate/b8088068a3bf5284df7f57db1ee11c91.webp?x-image-process=image/format,png)
4 在你的 (注意是主modules) 主modules-main下创建jniLibs文件夹,把demo中的jar包全部父之过去
![](https://i-blog.csdnimg.cn/blog_migrate/ddc9314a86009b594991473517f20878.webp?x-image-process=image/format,png)
5 之后就是导入easeui了(注意:确认build.gradle已经删除)
![](https://i-blog.csdnimg.cn/blog_migrate/cf852439852489291efa35b7ed3ace2e.webp?x-image-process=image/format,png)
接下来是添加依赖,选择菜单栏上Project Structure,找到自己的工程,在Dependencies找到绿色的“+”,选择第三个“Module dependency”
![](https://i-blog.csdnimg.cn/blog_migrate/2b9eb4dd9c7f7926bd667541c6b7ed60.webp?x-image-process=image/format,png)
6 导入easeui后发现他自动生成的build.gradle,这时才是我们需要的,将easeui的v4版本提升到23
![](https://i-blog.csdnimg.cn/blog_migrate/ebf808a9fddd518e5581f13d26eb6707.webp?x-image-process=image/format,png)
compile'com.android.support:support-v4:23.+'
7 这时应该编译通过了,有些机子运行发现以下问题
java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader[DexPathList[[dex file "/data/data/com.xxx.xxx/files/instant-run/dex/slice-support-annotations-24.1.0_ce9c5697cabea4565e89d9bb7a81deef74f26296-classes.dex", dex file "/data/data/com.xxx
![](https://i-blog.csdnimg.cn/blog_migrate/61ef8c1fb6183b90b5ea744dca45e1b8.webp?x-image-process=image/format,png)
如果遇到UnsatisfiedLinkError的问题,则在easeUI依赖库-jniLibs创建armeabi-v7a,然后将armeabi的.so文件拷贝一份进去即可。
之后你就可以根据你的需要进行自定义了,可以参考ChatDemoUI3.0,里面的逻辑很齐全了
![](https://i-blog.csdnimg.cn/blog_migrate/44aee0ef7241883e45db3544b08ea950.webp?x-image-process=image/format,png)