您当前的位置: 首页 >  ssl
  • 0浏览

    0关注

    483博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

高精度计算机视觉 发布时间:2018-08-01 22:20:21 ,浏览量:0

首先,程序在虚拟机上一切正常,在真机调试时闪退,报错内容大致如下, 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.HwCustTextViewImplW/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的错误,我仔细调试了一下,即使出现,也不致会使程序完全崩溃,也就是说这个错误不是程序闪退的元凶。

 

 

关注
打赏
1661664439
查看更多评论
立即登录/注册

微信扫码登录

0.0359s