android - 在路径上找不到类“android.support.v4.content.ContextCompat”:DexPathList[[zip file“/system/framework/org.apache.http.legacy.boot.jar”
问题描述
当我升级Androidx时,我遇到了如下问题:
预计没有待处理的异常:java.lang.ClassNotFoundException:在路径上找不到类“android.support.v4.content.ContextCompat”:DexPathList [[zip 文件“/system/framework/org.apache.http.legacy.boot .jar", zip 文件 "/data/app/com.alpha.lagouapk-hKiBdzRnFfV_fBa3ll3GWg==/base.apk"],nativeLibraryDirectories=[/data/app/com.alpha.lagouapk-hKiBdzRnFfV_fBa3ll3GWg==/lib/arm, /data/app/com.alpha.lagouapk-hKiBdzRnFfV_fBa3ll3GWg==/base.apk!/lib/armeabi-v7a, /system/lib, /product/lib]]
解决方案
该类重命名为androidx.core.content.ContextCompat
,请参阅规范。您需要将旧引用更改为新引用。
推荐阅读
- openvpn - 双隧道 OpenVPN
- c++ - 如何将 opendnp3 添加为静态 C++ 库
- c++ - 如何在分离头文件和实现文件的同时使用模板?
- ios - 如何偏移 UILabel 文本对齐?
- typescript - 打字稿:如何解释扩展和函数类型之间的这种交互
- angular - 使用 angular6 和 @ng-toolkit/universal 时 og 标签出现问题
- c# - 如何通过 Parallel.ForEach 使用计算机中的所有内核
- npm - 在 monorepo 中强制执行共享依赖项
- excel - VBA:如何在单元格范围内搜索值,并返回该位置旁边的单元格?
- javascript - 涉及先前状态的计算何时需要功能更新?