作者:mobiledu2502923673 | 来源:互联网 | 2023-09-24 18:40
while making a request to ssl protected api in my tests, i'm getting
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| java.lang.UnsatisfiedLinkError: org.apache.harmony.xnet.provider.jsse.NativeCrypto.clinit()V
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.clinit(Native Method)
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.(NativeCrypto.java:52)
at org.apache.harmony.xnet.provider.jsse.AbstractSessionContext.(AbstractSessionContext.java:44)
at org.apache.harmony.xnet.provider.jsse.ClientSessionContext.(ClientSessionContext.java:39)
at org.apache.harmony.xnet.provider.jsse.SSLContextImpl.(SSLContextImpl.java:51)
at org.apache.harmony.xnet.provider.jsse.OpenSSLContextImpl.(OpenSSLContextImpl.java:30)
at android.net.SSLCertificateSocketFactory.makeSocketFactory(SSLCertificateSocketFactory.java:207)
at android.net.SSLCertificateSocketFactory.getDelegate(SSLCertificateSocketFactory.java:236)
at android.net.SSLCertificateSocketFactory.createSocket(SSLCertificateSocketFactory.java:394)
at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:375)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:165)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
at org.robolectric.tester.org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:419)
at org.robolectric.shadows.ShadowDefaultRequestDirector.execute(ShadowDefaultRequestDirector.java:165)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:555)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:465)
at com.parse.ParseRequest$3.call(ParseRequest.java:266)
at com.parse.Task$3.run(Task.java:199)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695) |
i'm assuming this is happening because the version of apache client shipped in android-all does not have a valid library reference set. Any help with this issue is much appreciated!
该提问来源于开源项目:robolectric/robolectric
It made sense 3 years ago when there was no good alternative. I wouldn't be opposed to deprecating it in the next major release (i.e. 3.0). Or break it out into a separate package if it's possible.