android - 升级到 Android Studio 北极狐 Beta 4 后无法构建
问题描述
今天刚注意到Arctic Fox 更新了Beta 4。之前没有问题,我决定升级我的Beta 3。与往常一样,AGP 也需要升级。在我尝试使用新的 Gradle n AGP 构建项目之前,新的 Beta 版似乎运行良好。每次都出现此错误,除了恢复到北极狐 beta 3 或其正常发行版本外,我尝试过的任何方法(包括消息中建议的步骤)都无效。想知道这里是否有人知道原因并对此有解决方案
Unable to find method com.android.build.api.extension.VariantSelector com.android.build.api.extension.AndroidComponentsExtension.selector()
com.android.build.api.extension.VariantSelector com.android.build.api.extension.AndroidComponentsExtension.selector()
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
解决方案
如果您使用 Hilt,则必须等待 AGP 7 beta05。
在此处链接到 Hilt 问题
推荐阅读
- python - Anaconda frame.py 或我的程序中的 ValueError?
- javascript - 如何模拟“粉笔”库的所有方法?
- javascript - 如何使用 Media Recorder API 将录制流存储到移动浏览器中?
- php - PHP 7.4 CI 3 短回显标签在加载 CI 视图时抛出异常
- java - 按 IN 子句中的值查询DSL order
- spring - 如何在 Spring Cloud API Gateway 中实现基本身份验证?
- python - 读取文本文件中的最后一个字符,然后在满足条件时将其删除
- laravel-7 - 无法创建 laravel_logger_activity_table
- database - 在 .net 核心列中,“x”不能自动转换为 integer[] 您可能需要指定“USING”x”::integer[]”
- amazon-web-services - 如何使用 OpenApi yaml 在 AWS APIGateway 中启用缓存?