Compile error:Didn’t find class “org.apache.http.client.methods.HttpPost”

在Android9.0系统上进行软件测试,出现错误异常Didn’t find class “org.apache.http.client.methods.HttpPost” on path: DexPathList[[zip file “/data/app/com.seaclouds.××××××-sry7fhYL6L_ZIuYAuBCiTw==/base.apk”],nativeLibraryDirectories=[/data/app/com.seaclouds.××××××-sry7fhYL6L_ZIuYAuBCiTw==/lib……..一大堆错误,主要还是9.0系统不兼容导致的,9.0默认不支持http.client的类了
在项目的AndroidManifest.xml的application添加以下代码

android:usesCleartextTraffic="true"
<uses-library android:name="org.apache.http.legacy" android:required="false" />
Bookmark the permalink.

发表评论

  • fafsdsadsadsadas