1。java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
报错信息如下:
2022-07-04 14:29:36.154 1743-1743/? E/BaseLib ExU: ====printThrowableInfo begin====
2022-07-04 14:29:36.160 1743-1743/? E/BaseLib ExU: java.lang.RuntimeException: Unable to get provider android.support.v4.content.FileProvider: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.xjlmj.w5144-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xjlmj.w5144-1/lib/arm, /data/app/com.xjlmj.w5144-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:5278)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4836)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4760)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1414)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.FileProvider" on path: DexPathList[[zip file "/data/app/com.xjlmj.w5144-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xjlmj.w5144-1/lib/arm, /data/app/com.xjlmj.w5144-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.ActivityThread.installProvider(ActivityThread.java:5263)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4836)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4760)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1414)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5539)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:745)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:635)
Suppressed: java.lang.ClassNotFoundException: android.support.v4.content.FileProvider
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 12 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
2022-07-04 14:29:36.160 1743-1743/? E/BaseLib ExU: ====printThrowableInfo end====
尝试解决1
删除.grade文件夹。
关闭as工程重新打包,报错如下:
https://blog.csdn.net/Mr___Xu/article/details/79237583
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'AS_bt5'.
java.lang.NullPointerException (no error message)
解决无果,果断放弃。
尝试解决2
将local.properties里的ndk.dir直接删掉或者注释
打包运行,仍未解决
参考自:https://blog.csdn.net/Mr___Xu/article/details/79237583
尝试解决3
关闭 AS的 Instant Run。关闭AS InstallRun的方法如下:
打开AS设置界面
然后找到Build->Testing, 取消勾选就。
打包运行,仍然报错,人都要崩溃了~
参考自:https://blog.csdn.net/guiping_ding/article/details/88739421
尝试解决4
既然百度解决不了,那就专业问题问专业人士了,果断找到相应sdk技术人员,询问了一番:
打开了专业人士给的网址:https://www.quicksdk.com/doc-787.html?cid=9
原来早在2019年,sdk官网就给了相应的解决办法,联系分包人员
,按照指导意见操作,果然,就成功了!
1。去掉v4忽略参数
2。替换技术大大给的文件,替换路径如下:
3。出渠道包
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat
报错信息如下:
2022-07-01 16:49:11.344 2111-2222/? E/BaseLib ExU: ====printThrowableInfo begin====
2022-07-01 16:49:11.348 2111-2222/? E/BaseLib ExU: java.lang.Error: FATAL EXCEPTION [pool-1-thread-3]
Unity version : 2018.3.0f2
Device model : 华为 mate40
Device fingerprint: OnePlus/OnePlus2/OnePlus2:6.0.1/MMB29M/1447841200:user/release-keys
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat;
at com.quicksdk.utility.f.b(DeviceInfo.java:235)
at com.quicksdk.utility.f.<init>(DeviceInfo.java:77)
at com.quicksdk.utility.f.a(DeviceInfo.java:65)
at com.quicksdk.net.a.a(ApiRequest.java:149)
at com.quicksdk.net.a.a(ApiRequest.java:497)
at com.quicksdk.net.Connect$14.run(Connect.java:515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.content.ContextCompat" on path: DexPathList[[zip file "/data/app/com.game456.xjlmj-1/base.apk"],nativeLibraryDirectories=[/data/app/com.game456.xjlmj-1/lib/arm, /data/app/com.game456.xjlmj-1/base.apk!/lib/armeabi-v7a, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at com.quicksdk.utility.f.b(DeviceInfo.java:235)
at com.quicksdk.utility.f.<init>(DeviceInfo.java:77)
at com.quicksdk.utility.f.a(DeviceInfo.java:65)
at com.quicksdk.net.a.a(ApiRequest.java:149)
at com.quicksdk.net.a.a(ApiRequest.java:497)
at com.quicksdk.net.Connect$14.run(Connect.java:515)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
Suppressed: java.lang.ClassNotFoundException: android.support.v4.content.ContextCompat
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 10 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
百度各种方法无果之后,又zhaodaosdk的技术大大,把母包发过去,大大分析后发现我的apk包的v4不完整,只有如下一点:
而一个完整的v4包包括下图所有内容:
为了方便查看自己的apk的v4包有哪些内容,需要先找到一个工具可以反编译apk。
如下:下载反编译需要用到的工具https://download.csdn.net/download/shirln/85898645
1。将解压缩的两个文件放在下面路径下:路径:C:\Windows\新建文件夹。
2。并将需要反编译的apk放1目录里。
3。双击运行bat文件。
4。win+r调出命令窗口,输入cmd,
5。切换到步骤1中的指定文件夹路径下
6。输入apktool d apk apk的包名.apk。
参考自:https://www.jianshu.com/p/610dbeb11a1e?utm_campaign=maleskine&utm_content=note&utm_medium=seo_notes&utm_source=recommendation
但是把网络翻了一个遍,也不知道v4为什么没有全部编译进去,无奈,只有采用报错1的方法,替换文件夹,完美解决。
两个问题都是关于v4的,如果有大佬能指点一下,为什么v4没有被全部编译进去,那小女子感激不尽。
标题:unity接入quick sdk报错总结(Andriod第三版)
作者:shirlnGame
地址:https://www.mmzsblog.cn/articles/2022/07/04/1656899703746.html
如未加特殊说明,文章均为原创,转载必须注明出处。均采用CC BY-SA 4.0 协议!
本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。若本站转载文章遗漏了原文链接,请及时告知,我们将做删除处理!文章观点不代表本网站立场,如需处理请联系首页客服。
• 网站转载须在文章起始位置标注作者及原文连接,否则保留追究法律责任的权利。
• 公众号转载请联系网站首页的微信号申请白名单!
个人微信公众号 ↓↓↓
1。java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
尝试解决1
尝试解决2
尝试解决3
尝试解决4
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/content/ContextCompat