Mobicents Restcomm Hello-World Implementation

2019-03-01 09:08发布

I am following Mobicents Restcomm's guide to implement Restcomm Client Android. I am following their quick start guide for that. I have imported their Hello-World program in Android Studio but there are some issues. It is imported but it is throwing some errors. These are as follows:

Error:(5, 18) error: package org.webrtc does not exist
Error:(6, 18) error: package org.webrtc does not exist
Error:(7, 18) error: package org.webrtc does not exist
Error:(19, 31) error: package PeerConnection does not exist
Error:(25, 12) error: cannot find symbol class SessionDescription
Error:(26, 12) error: cannot find symbol class SessionDescription
Error:(27, 17) error: cannot find symbol class IceCandidate
Error:(33, 32) error: package PeerConnection does not exist
Error:(36, 13) error: cannot find symbol class SessionDescription
Error:(36, 47) error: cannot find symbol class IceCandidate
Error:(65, 34) error: cannot find symbol class SessionDescription
Error:(65, 68) error: cannot find symbol class IceCandidate
Error:(110, 57) error: cannot find symbol class SessionDescription
Error:(141, 33) error: cannot find symbol class IceCandidate
Error:(149, 44) error: package PeerConnection does not exist
C:\Users\Nadeem Ilyas\Desktop\restcomm-android-sdk-1.0.0-BETA3\restcomm.android.client.sdk\src\main\java\org\mobicents\restcomm\android\client\sdk\SignalingParameters.java

Please help me fixing this issue. I will really appreciate your help in this matter.

1条回答
等我变得足够好
2楼-- · 2019-03-01 09:48

Seems like the jars and/or native libraries for WebRTC implementation cannot be found for some reason. Did you download the latest tar.bz2 bundle from the GitHub release page or did you just clone the GitHub repo?

If you did the first, the jars and libs should be there, but if you cloned the repo you need to download and add separately from GitHub release tarball cause such binary files tend to make the repo huge and we avoid putting them there.

To verify if you have the files needed, please go to RESTCOMM_ANDROID_SDK_ROOT/restcomm.android.client.sdk/libs. There you should find 'libjingle_peerconnection_java.jar'

EDIT:

You will also need to edit MainActivity.java and replace:

params.put("pref_sip_user", "bob");

with:

params.put("pref_sip_user", "android-sdk");

Because bob is a very common user and might be provisioned by someone else with unknown password. That should fix your issue. By the way you can also enable more verbose logging for RCClient by setting the log level before calling RCClient.initialize():

RCClient.setLogLevel(Log.VERBOSE);

Best regards, Antonis

查看更多
登录 后发表回答