Android Studio报错:ClassLoader referenced unknown。。。W/ResourceType: Failure getting entry for 。。。

首先,程序在虚拟机上一切正常,在真机调试时闪退,报错内容大致如下,
I/System.out: waiting for debugger to settle...
I/System.out: debugger has settled (1389)
W/System: ClassLoader referenced unknown path: /data/app/com.spacesoftwares.demo-1/lib/arm64
I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/HwCust: Constructor found for class android.widget.HwCustTextViewImpl
I/HwCust: Constructor found for class android.widget.HwCustTextViewImpl
W/ResourceType: Failure getting entry for 0x7f060055 (t=5 e=85) (error -75)
I/Process: Sending signal. PID: 6244 SIG: 9
Disconnected from the target VM, address: 'localhost:8604', transport: 'socket'

一般的报错,上网找些答案,基本能比较快地解决,这次的报错比较顽固,按网上的办法各种尝试,都不奏效。

典型但无效的办法有以下(注意,取决于个体情况,很多人说有效,尤其是那个instant run):

关闭instant run; 变更app buildToolsVersion;变更compileSdkVersion和targetSDKVersion;

 

最后在这里找一个2011年帖子,

https://www.cnblogs.com/chenxingkui/archive/2011/05/03/2035975.html

内容大致是说drawable文件的放置的地方不对,会引起这个错误。

因为11年的版本才1.5,现在都已经改到面目全非了。不过抱着试试看的心情,我把所有的图片文件都挪到了res->drawable文件夹下面,奇迹,问题消失了。

不过要注意,drawable-v24的文件,在工程中也会显示是在drawable下面,所以一定要到文件夹里去操作,不要在android studio 中操作。如下图,

至于说那个W/System: ClassLoader referenced unknown path的错误,我仔细调试了一下,即使出现,也不致会使程序完全崩溃,也就是说这个错误不是程序闪退的元凶。

 

 

  • 9
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 11
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值