可能重複:
Getting NoClassDefFoundError when using common.lang.StringUtils in android java code?的Android 4.1的NoClassDefFoundError org.bouncycastle.asn1
我在Android的新的。
我的應用程序崩潰的設備與ANdroid 4.1。
java.lang.NoClassDefFoundError: org.bouncycastle.asn1.x509.X509Name
at android.net.http.DomainNameChecker.matchDns(DomainNameChecker.java:187)
at android.net.http.DomainNameChecker.match(DomainNameChecker.java:62)
at com.android.email.mail.store.TrustManagerFactory$SecureX509TrustManager.checkServerTrusted(TrustManagerFactory.java:82)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.verifyCertificateChain(OpenSSLSocketImpl.java:597)
at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_do_handshake(Native Method)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:395)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.<init>(OpenSSLSocketImpl.java:647)
at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStream(OpenSSLSocketImpl.java:618)
at com.android.email.mail.store.ImapStore$ImapConnection.open(ImapStore.java:1330)
在andorid小於4.1的設備上一切正常。 誰能告訴我。問題在哪裏?
名單包括圖書館
Yes. in bottom list of included libraries:
google-http-client-1.6.0-beta.jar
google-http-client-extensions-1.6.0-beta.jar
google-http-client-extensions-android2-1.6.0-beta.jar
雅虎我沒有找到合適的解決方案:
在搭載Android 4.1是沒有BouncyCastle的圖書館。我添加入項目和錯誤消失
你使用過任何外部'.jar'文件嗎? – Praveenkumar 2012-08-06 09:16:41
是的。我附加了包含庫的列表 – idreamussr 2012-08-06 09:24:16
[試試這個](http://stackoverflow.com/questions/11823975/getting-noclassdeffounderror-when-using-common-lang-stringutils-in-android-java/11824038#11824038) – Praveenkumar 2012-08-06 09:25:09