Twilio API抛出异常

时间:2019-05-22 10:32:21

标签: android api compiler-errors sms

我正在尝试使用JavaDoc库,创建了一个帐户,获得了令牌,还创建了twilio no,但是当我尝试实现Sms方法时,它抛出了一些异常

Process: net.iquesoft.myapplication, PID: 27874
java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar:classes2.dex)
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:114)
    at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:121)
    at com.twilio.http.NetworkHttpClient.<init>(NetworkHttpClient.java:58)
    at com.twilio.http.TwilioRestClient$Builder.build(TwilioRestClient.java:102)
    at com.twilio.Twilio.getRestClient(Twilio.java:129)
    at com.twilio.base.Creator.create(Creator.java:45)
    at net.iquesoft.myapplication.MainActivity$1.onClick(MainActivity.java:35)
    at android.view.View.performClick(View.java:5207)
    at android.view.View$PerformClick.run(View.java:21177)
    at android.os.Handler.handleCallback(Handler.java:739)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:148)
    at android.app.ActivityThread.main(ActivityThread.java:5441)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

我也尝试了另一种方法,但是这样就不会收到通知。任何帮助或指南都会有所帮助

0 个答案:

没有答案