我在我的一个应用程序中使用了quickblox。 已使用
添加其依赖项app build.gradle =>
// start quickblox, online dependencies, from remote repository, aar files
compile "com.quickblox:quickblox-android-sdk-core:${rootProject.qbSdkVersion}@aar"
compile("com.quickblox:quickblox-android-sdk-chat:${rootProject.qbSdkVersion}@aar") {
transitive = true
}
compile "com.quickblox:quickblox-android-sdk-content:${rootProject.qbSdkVersion}@aar"
compile "com.quickblox:quickblox-android-sdk-messages:${rootProject.qbSdkVersion}@aar"
compile "com.quickblox:quickblox-android-sdk-customobjects:${rootProject.qbSdkVersion}@aar"
compile "com.quickblox:quickblox-android-sdk-location:${rootProject.qbSdkVersion}@aar"
compile "com.quickblox:quickblox-android-sdk-videochat-webrtc:${rootProject.qbSdkVersion}@aar"
注意qbSdkVersion=2.5
prject build.gradle =>
allprojects {
repositories {
jcenter()
maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
mavenCentral()
}}
这一切都可以获取构建依赖项,实际上会话和登录也可以。
由于跟随错误,应用程序在startCall()上崩溃..
02-23 21:18:31.671 30766-2911/com.prontoitlabs.pocquickblox E/AndroidRuntime: FATAL EXCEPTION: Thread-212
Process: com.prontoitlabs.pocquickblox, PID: 30766
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.prontoitlabs.pocquickblox-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libjingle_peerconnection_so.so"
at java.lang.Runtime.loadLibrary(Runtime.java:366)
at java.lang.System.loadLibrary(System.java:988)
at org.webrtc.PeerConnectionFactory.<clinit>(PeerConnectionFactory.java:39)
at com.quickblox.videochat.webrtc.PeerFactoryManager.initializeFactoryFieldTrials(PeerFactoryManager.java:109)
at com.quickblox.videochat.webrtc.PeerFactoryManager.initPeerConnectionFactory(PeerFactoryManager.java:83)
at com.quickblox.videochat.webrtc.PeerFactoryManager.access$100(PeerFactoryManager.java:11)
at com.quickblox.videochat.webrtc.PeerFactoryManager$1.run(PeerFactoryManager.java:59)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at com.quickblox.videochat.webrtc.LooperExecutor.run(LooperExecutor.java:73)
我不明白这个nativelibs错误,我的意思是我没有包含使用libs / *的依赖.jar等我已经使用了gradle依赖。
我使用以下gradle classpath 'com.android.tools.build:gradle:1.5.0'
帮助!...
答案 0 :(得分:1)
请参阅视频聊天示例https://github.com/QuickBlox/quickblox-android-sdk/tree/master/sample-videochat-webrtc。你应该把.so文件放在src / main下的jnilibs /目录下。
答案 1 :(得分:1)
在项目 build.gradle
中添加这些行
allprojects {
repositories {
maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
mavenCentral()
}
}