Error:(17, 24) 警告: Application namespace for attribute app:url will be ignored.

来源:互联网 发布:线切割控制编程系统 编辑:程序博客网 时间:2024/06/06 09:49
这是一个不致命的错误,不影响程序的运行,但是这是一个不稳定因素,最好解决为妙,首先分析一下他的意思,简单来说就是“app:url”这个属性将被系统驳回,这个问题我也看过一个别人的博客介绍,可能资历有限,没有明白,后来自己研究了一下,发现是
@BindingAdapter("app:url")    public static void getIntentImage(ImageView iv,String url){        Picasso.with(iv.getContext()).load(url).into(iv);    }


我在@BindingAdapter中加了app三个字母,这个问题解决方案是把app删掉,就可以了,但是删掉
<ImageView    android:id="@+id/iv"    android:src="@mipmap/ic_launcher_round"    android:layout_width="100dp"    android:layout_height="100dp"  app:url="@{user.url}"    />


这个布局中url@后的内容只能手写了,没有提示,但是这解决了那个警告,我只能做到这了,诸位如果有好的解决方案,留言一下,共同进步。
阅读全文
0 0
原创粉丝点击