Sinch客户端未启动。怎么办?

时间:2019-05-27 18:59:15

标签: android sinch

我仅将Sinch SDK用于拨出电话,但是在按钮上单击它表示客户端未启动。有人帮忙。 包com.example.hp.assignment_2_q_2;

public class fragment_tools extends Fragment {
Button button;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
    View view = inflater.inflate(R.layout.fragment_tools,container, false);
    button = view.findViewById(R.id.button2);
    android.content.Context context = this.getActivity();
    SinchClient sinchClient = Sinch.getSinchClientBuilder().context(context)
            .applicationKey("Hidden")
            .applicationSecret("Hidden")
            .environmentHost("clientapi.sinch.com")
            .userId("Hidden")
            .build();
    sinchClient.setSupportCalling(true);
    sinchClient.start();
    button.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            CallClient callClient = sinchClient.getCallClient();
            callClient.callPhoneNumber("+92----------");

        }
    });


    return view;
    }
}

这是我面临的错误

2019-05-28 21:33:23.325 6845-6845/? E/Zygote: v2

2019-05-28 21:33:23.326 6845-6845 /? E /合子:accessInfo:0 2019-05-28 21:33:26.397 6845-6845 / com.example.sinch_practice E / BoostFramework:BoostFramework():Exception_1 = java.lang.ClassNotFoundException:找不到关于“ com.qualcomm.qti.Performance”的类路径:DexPathList [[],nativeLibraryDirectories = [/ system / lib64,/ vendor / lib64]] 2019-05-28 21:33:26.547 6845-6845 / com.example.sinch_practice E / AndroidRuntime:FATAL EXCEPTION:main     流程:com.example.sinch_practice,PID:6845     java.lang.IllegalStateException:SinchClient未启动         在com.sinch.android.rtc.internal.client.calling.DefaultCallClient.throwUnlessStarted(未知来源)         在com.sinch.android.rtc.internal.client.calling.DefaultCallClient.call(未知来源)         在com.sinch.android.rtc.internal.client.calling.DefaultCallClient.callPhoneNumber(未知来源)         在com.sinch.android.rtc.internal.client.calling.DefaultCallClient.callPhoneNumber(未知来源)         在com.example.sinch_practice.MainActivity $ 1.onClick(MainActivity.java:32)         在android.view.View.performClick(View.java:6205)         在android.widget.TextView.performClick(TextView.java:11103)         在android.view.View $ PerformClick.run(View.java:23653)         在android.os.Handler.handleCallback(Handler.java:751)         在android.os.Handler.dispatchMessage(Handler.java:95)         在android.os.Looper.loop(Looper.java:154)         在android.app.ActivityThread.main(ActivityThread.java:6682)         在java.lang.reflect.Method.invoke(本机方法)         在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1520)         在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

0 个答案:

没有答案