java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/message/BasicNameValuePair
或者html
java.lang.RuntimeException: Stub! at org.apache.http.message.BasicNameValuePair.<init>(BasicNameValuePair.java:6)
出現此問題主要是 apache 的 http 庫在android 9.0刪除致使的,出現此問題應該是使用了 apache 的http庫。java
儘可能不要再使用httpClient來訪問網絡,替換成HttpURLConnection或者OKHttp。最後再說明一下:儘可能不要使用過期的庫進行開發。
android
參考連接:Android 9.0/P 版本推薦使用 HttpURLConnection,棄用 Apache HTTPClientapache