Gradle 踩过的坑

com.android.application 9.1.0 与 com.google.dagger.hilt.android 2.57.1 不兼容

在gradle sync时报Failed to apply plugin 'com.google.dagger.hilt.android'

shell 复制代码
An exception occurred applying plugin request [id: 'com.google.dagger.hilt.android']
> Failed to apply plugin 'com.google.dagger.hilt.android'.
   > Android BaseExtension not found.

解决方法:

将com.google.dagger.hilt.android升级到2.59,com.google.devtools.ksp升级到2.3.4

kotlin 复制代码
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {

    id("com.google.devtools.ksp") version "2.3.4" apply false
    id("com.google.dagger.hilt.android") version "2.57.1" apply false
}
相关推荐
茶栀(*´I`*)1 小时前
Android 测试入门指南:ADB 基础配置与常用设备管理命令解析
android·adb
gxgldyh3 小时前
Android Framework源码解析(七):BootAnimation 启动流程解析——开机动画是如何显示出来的?
android
达达尼昂3 小时前
在 Claude Cowork 中用好 Claude Fable 5
android·人工智能·后端
sTone873754 小时前
写时复制COW的第一性理解
android·c++·flutter
sTone873754 小时前
Zygote的第一性理解
android
sTone873754 小时前
类RN框架通过Service暴露卡片渲染能力给AI Chat
android·react native
灯火不休4 小时前
Android Studio & Flutter 构建命令完全指南
android
杉氧4 小时前
Ktor 全栈之路 (5):JWT 认证全流程实战 —— 打造安全通信闭环
android·架构·kotlin
️学习的小王5 小时前
Python + MySQL 学生信息管理系统实战教程
android·python·mysql
帅次5 小时前
Android 高级工程师面试:Flutter 路由导航 近1年高频追问 18 题
android·flutter·面试