The ‘kotlin-android-extensions‘ Gradle plugin is no longer supported.

Android使用kotlin开发,运行报错

The 'kotlin-android-extensions' Gradle plugin is no longer supported.  Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.

出现这个提示是因为’kotlin-android-extensions’是android studio不赞成使用的。

app model下的build.gradle里面的id 'kotlin-android-extensions’删除
在这里插入图片描述
改成

 buildFeatures {
        viewBinding true
    }

如下图
在这里插入图片描述
然后再sync now 同步一下就可以了

相关推荐

  1. [Android] Android.mk 转 Android.bp

    2024-01-23 14:20:03       52 阅读
  2. Android】IntentService

    2024-01-23 14:20:03       58 阅读
  3. Android:BackStackRecord

    2024-01-23 14:20:03       55 阅读
  4. Android:FragmentHostCallback

    2024-01-23 14:20:03       63 阅读
  5. Android】DeepLink

    2024-01-23 14:20:03       57 阅读
  6. android ——动画

    2024-01-23 14:20:03       56 阅读
  7. android —— PopupWindow

    2024-01-23 14:20:03       52 阅读
  8. Android registerForActivityResult

    2024-01-23 14:20:03       54 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-23 14:20:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-23 14:20:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-01-23 14:20:03       87 阅读
  4. Python语言-面向对象

    2024-01-23 14:20:03       96 阅读

热门阅读

  1. Zookeeper源码分析ZooKeeperServer

    2024-01-23 14:20:03       47 阅读
  2. 华纳云:web服务器和www服务器有什么区别?

    2024-01-23 14:20:03       52 阅读
  3. Unity UnityWebRequest 向php后端上传图片文件

    2024-01-23 14:20:03       58 阅读
  4. C Primer Plus(第六版)13.11 编程练习 第9题

    2024-01-23 14:20:03       59 阅读
  5. Rust 中的 Option、Result 和 ? 运算符

    2024-01-23 14:20:03       57 阅读
  6. Rust 并发

    2024-01-23 14:20:03       49 阅读
  7. 树莓派ubuntu:CSI接口摄像头安装驱动程序及测试

    2024-01-23 14:20:03       55 阅读
  8. UNITY BUILD加速cmake 编译

    2024-01-23 14:20:03       51 阅读
  9. VSCode 中 Tab 键突然不能缩进了

    2024-01-23 14:20:03       52 阅读
  10. 边缘计算的挑战和机遇

    2024-01-23 14:20:03       60 阅读
  11. R语言【cli】——ansi_strtrim():截断ANSI字符串

    2024-01-23 14:20:03       54 阅读
  12. NLP深入学习(七):词向量

    2024-01-23 14:20:03       55 阅读