![](/img/trans.png)
[英]This version of the Android Support plugin for IntelliJ IDEA or Android Studio cannot open this project, please retry with version 2021.1.1 or newer
[英]Cannot solve 'This version of the Android Support plugin for IntelliJ IDEA cannot open this project, please retry with version 4.1 or newer.'
IntelliJ IDEA 2020.3 尚不支持 Android gradle 插件 4.1 版本。 您有两个选择:降级 AGP 并使用 IDEA: com.android.tools.build:gradle:4.0.2
:gradle:4.0.2
或切换到 Android Studio 4.1+
Android 插件 4.1 将从 2021.1 的第一个 EAP 开始在 IDEA 中提供。 EAP 版本应该在本周开始。
在 2022 年,这个错误仍然不时出现。 在 IntelliJ IDEA 2021.3.3(社区版)中打开我的旧 Android 项目之一时,我遇到了完全相同的错误,并且遇到了完全相同的错误。
但是通过将此行写入项目级“build.gradle”文件的“依赖项”部分来解决它
classpath 'com.android.tools.build:gradle:7.0.0'
您只需要更改此行中的版本即可解决错误
只需使用classpath 'com.android.tools.build:gradle:7.0.0'
更新依赖项块中的顶级构建 gradle
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.