As Databinding “Missing import expression although it is registered”

AS常见报错 专栏收录该内容
24 篇文章 4 订阅

当android studio 3.5,gradle更新到5.0之后出现

Build:build failed

Found data binding error(s):

[databinding] {"msg":"Missing import expression although it is registered",
"file":"E:\\....\app\\src\\main\\res\\layout\\布局.xml","pos":[]}

或显示具体情况

错误: 找不到符号
符号: 类xxxBindingImpl
位置: 程序包 com.xxx.xxx.databinding

解决方案:

升级Android Studio和gradle插件后,在布局文件中使用了<import type="java.lang.String" />,删除此导入即可解决此问题。

就像在托管代码中一样,java.lang.*是自动导入的。

参考:https://www.e-learn.cn/content/wangluowenzhang/2178149

  • 1
    点赞
  • 0
    评论
  • 1
    收藏
  • 一键三连
    一键三连
  • 扫一扫,分享海报

<p>本套课程适用于有一定的<span style="color: #e03e2d;">iOS、Android、Flutter</span>开发基础。</p> <p>学完本次课程,能够让大家对Flutter如何调用移动端原生页面有一个清晰的认识;在纯Flutter开发过程中遇到需要调用原生功能的时候,能够快速定制属于自己或者公司的私有插件- Plugin。</p> <p>课程一共氛围两部分:</p> <p>1、Flutter插件跟iOS的交互部分:包括调用iOS原生页面、如何使用iOS的<span style="color: #e03e2d;">framework二进制</span>、<span style="color: #e03e2d;">bundle资源文件</span>、依赖的cocoapods资源;</p> <p>2、Flutter插件跟安卓的交互部分:包括调用Android原生页面、如何接收原生页面的回调、如何使用aar文件、依赖的其他资源。</p> <p>最终能够帮助大家定制私有插件;提升工作技能。</p> <p><span style="color: #e03e2d;">备注:课程中使用环境</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures; color: #2fb41d;">[✓]</span><span style="font-variant-ligatures: no-common-ligatures;"> Flutter (Channel stable, 1.22.5, on macOS 11.0.1 20B29 darwin-arm, locale zh-Hans-CN)</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9); min-height: 14px;"><span style="font-variant-ligatures: no-common-ligatures;"> </span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures; color: #9fa01c;">[!]</span><span style="font-variant-ligatures: no-common-ligatures;"> Android toolchain - develop for Android devices (Android SDK version 30.0.3)</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #00ff00; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures;">    </span><span style="font-variant-ligatures: no-common-ligatures; color: #9fa01c;">!</span><span style="font-variant-ligatures: no-common-ligatures;"> Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures; color: #2fb41d;">[✓]</span><span style="font-variant-ligatures: no-common-ligatures;"> Xcode - develop for iOS and macOS (Xcode 12.2)</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures; color: #9fa01c;">[!]</span><span style="font-variant-ligatures: no-common-ligatures;"> Android Studio (version 4.1)</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures; color: #2fb41d;">[✓]</span><span style="font-variant-ligatures: no-common-ligatures;"> IntelliJ IDEA Community Edition (version 2020.3)</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"><span style="font-variant-ligatures: no-common-ligatures; color: #2fb41d;">[✓]</span><span style="font-variant-ligatures: no-common-ligatures;"> Connected device (1 available)</span></p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9); min-height: 14px;"> </p> <p style="margin: 0px; font-stretch: normal; font-size: 12px; line-height: normal; font-family: 'Andale Mono'; color: #2fff12; background-color: rgba(0, 0, 0, 0.9);"> </p>
相关推荐
<p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-size:13.5pt;font-family:'微软雅黑',sans-serif;color:#3598db;">【为什么要学习这门课】</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;">Linux</span><span style="font-family:'微软雅黑',sans-serif;color:#222226;">创始人<span>Linus Torvalds</span>有一句名言:<span>Talk is cheap. Show me the code. </span></span><span style="font-family:微软雅黑, sans-serif;color:#e03e2d;background-color:#ffffff;">冗谈不够,放码过来!</span><span style="font-family:'微软雅黑',sans-serif;color:#222226;">代码阅读是从基础到提高的必由之路。 </span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;">YOLOv5</span><span style="font-family:'微软雅黑',sans-serif;color:#222226;">是最近推出的轻量且高性能的实时目标检测方法。<span>YOLOv5</span>使用<span>PyTorch</span>实现,含有很多业界前沿和常用的技巧,可以作为很好的代码阅读案例,让我们深入探究其实现原理,其中不少知识点的代码可以作为相关项目的借鉴。</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-size:13.5pt;font-family:'微软雅黑',sans-serif;color:#3598db;">【课程内容与收获】</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;">本课程将详细解析<span>YOLOv5</span>的实现原理和源码,对关键代码使用<span>PyCharm</span>的<span>debug</span>模式逐行分析解读。 本课程将提供注释后的<span>YOLOv5</span>的源码程序文件。</span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-family:'微软雅黑',sans-serif;color:#222226;"> <img src="https://img-bss.csdnimg.cn/202012061533559839.jpg" alt="课程内容" /></span> </p> <p class="MsoNormal" style="text-align:left;background:white;" align="left"> <span style="font-size:13.5pt;font-family:'微软雅黑',sans-serif;color:#3598db;">【相关课程】</span> </p> <p style="margin-left:0cm;"> 本人推出了有关YOLOv5目标检测的系列课程。请持续关注该系列的其它视频课程,包括: </p> <p> 《YOLOv5(PyTorch)目标检测实战:训练自己的数据集》 </p> <p> Ubuntu系统 <strong><a href="https://edu.csdn.net/course/detail/30793"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/30793</span></a></strong> </p> <p> Windows系统 <strong><a href="https://edu.csdn.net/course/detail/30923"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/30923</span></a></strong> </p> <p> 《YOLOv5(PyTorch)目标检测:原理与源码解析》<strong><a href="https://edu.csdn.net/course/detail/31428"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/31428</span></a></strong> </p> <p> 《YOLOv5(PyTorch)目标检测实战:Flask Web部署》<strong><a href="https://edu.csdn.net/course/detail/31087"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/31087</span></a></strong> </p> <p> 《YOLOv5(PyTorch)目标检测实战:TensorRT加速部署》<strong><a href="https://edu.csdn.net/course/detail/32303"><span style="color:#7c79e5;">https://edu.csdn.net/course/detail/32303</span></a></strong> </p>
©️2020 CSDN 皮肤主题: 书香水墨 设计师:CSDN官方博客 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值