我已经使用外部jar库(Intersult http)编译了我的Android应用程序并猜测了什么。
java.lang.NoClassDefFoundError: com.intersult.net.https.HttpsClient
at com.intersult.net.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:185)
at com.intersult.net.http.HttpURLConnection.plainConnect(HttpURLConnection.java:699)
at com.intersult.net.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:171)
at com.intersult.net.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl.java:153)
at com.intersult.net.http.NtlmHttpURLConnection.connect(NtlmHttpURLConnection.java:55)
at com.intersult.net.http.NtlmHttpURLConnection.getOutputStream(NtlmHttpURLConnection.java:214)
at com.peachinc.italiawire.network.NtlmTransport.call(NtlmTransport.java:106)
at com.peachinc.italiawire.network.NtlmTransport.call(NtlmTransport.java:53)
at org.ksoap2.transport.Transport.call(Transport.java:255)
at com.peachinc.italiawire.network.HttpRequests.getTransCalendar(HttpRequests.java:145)
at com.peachinc.italiawire.FrmMain$1.run(FrmMain.java:120)
如您所见,HttpsClient和AbstractDelegateHttpsURLConnection这两个类位于同一个包中,并位于同一个jar lib中。但其中一个正确加载而第二个没有。那么这里发生了什么?
尝试通过gradle命令行清理,重建和清理。它没有用。