A project that has not been updated for a long time is flashing after updating targetSdkVersion = 30 (below 29 has been mercilessly abandoned…) , this following error is reported:
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/util/ByteArrayBuffer; at com.iflytek.cloud.thirdparty.an.a(SourceFile:178) at com.iflytek.cloud.thirdparty.an.b(SourceFile:309) at com.iflytek.cloud.thirdparty.an.run(SourceFile:163) Caused by: java.lang.ClassNotFoundException: Didn't find class "org.apache.http.util.ByteArrayBuffer" on path: DexPathList[[zip file "/data/app/com.qjtc.magicalar-7__z6vqbyO2enmVlUO8V7A==/base.apk"],nativeLibraryDirectories=[/data/app/com.qjtc.magicalar-7__z6vqbyO2enmVlUO8V7A==/lib/arm, /data/app/com.qjtc.magicalar-7__z6vqbyO2enmVlUO8V7A==/base.apk!/lib/armeabi-v7a, /system/lib, /hw_product/lib]]
Can’t find the class ByteArrayBuffer is deprecated, add org.apache.http.legacy to introduce this library.
Solution: Add the following codes in the <application> tag of AndroidManifest.xml:
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
Read More:
- [Solved] Groovy Project Compile Error: java.lang.NoClassDefFoundError: org/apache/tools/ant/util/ReaderInputStream
- [Solved] Flume Error: java.lang.NoClassDefFoundError: org/apache/hadoop/conf/Configuration
- [Solved] java.lang.noclassdeffounderror when idea runs Flink: org/Apache/flick/API/common/executionconfig
- Tomcat startup error: java.lang.NoClassDefFoundError
- [Solved] Weblogic startup error: java.lang.NoClassDefFoundError
- [Solved] flink Write Files Error: lang.NoClassDefFoundError: org/apache/flink/api/common/typeinfo/TypeInformation
- Java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; error resolution
- Springboot Run Error: java.lang.NoClassDefFoundError: org/eclipse/jetty/server/Handler
- Start error in maven web project java.lang.ClassNotFoundException: org.springframework.web.util.Log4jConfigListener
- [Solved] java.lang.reflect.InaccessibleObjectException: Unable to make protected java.net.http.HttpRequest()…
- POI Export Excel Error: HTTP Status 500 – Request processing failed; nested exception is java.lang.NullPointerException
- [Solved] java.lang.ClassNotFoundException: org.apache.ibatis.session.SqlSession
- [Solved] Caused by: java.lang.ClassNotFoundException: org.apache.flink.api.common.typeinfo.TypeInformation
- Hive Error: FAILED: RuntimeException Error loading hooks(hive.exec.post.hooks): java.lang.ClassNotFoundException: org.apache.atlas.hive.hook.HiveHook
- [Maven Error] Exception in thread “main” java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
- Hive ERROR Failed with exception java.io.IOException:java.lang.IllegalArgumentException
- [Solved] habse Start Error: Error: Could not find or load main class org.apache.hadoop.hbase.util.GetJavaProperty
- [Solved] Hystrix error: java.util.concurrent.TimeoutException: null
- [Solved] Non-fatal Exception: java.lang.UnsatisfiedLinkError: dlopen failed: library “libmmkv.so“ not found