错误记录AS 编译报错 ( Android Support plugin 版本太高 | 升级 Android Studio 到最新版本 )

Posted 韩曙亮

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录AS 编译报错 ( Android Support plugin 版本太高 | 升级 Android Studio 到最新版本 )相关的知识,希望对你有一定的参考价值。





一、报错信息



从 GitHub 中 Clone 了一份代码 , 编译时报如下错误 ;

Download https://services.gradle.org/distributions/gradle-6.7.1-bin.zip (102.84 MB)
Download https://services.gradle.org/distributions/gradle-6.7.1-bin.zip finished succeeded, took 1 m 55 s 666 ms
Starting Gradle Daemon...
Gradle Daemon started in 4 s 99 ms
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
AGPBI: {"kind":"warning","text":"Please remove usages of `jcenter()` Maven repository from your build scripts and migrate your build to other Maven repositories.\\nThis repository is deprecated and it will be shut down in the future.\\nSee http://developer.android.com/r/tools/jcenter-end-of-service for more information.\\nCurrently detected usages in: root project 'Plugin_Hook', project ':app'","sources":[{}]}

FAILURE: Build failed with an exception.

* What went wrong:
This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
com.intellij.openapi.externalSystem.model.ExternalSystemException: This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.addBuildModels(ProjectImportAction.java:273)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:131)
	at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:56)
	at org.gradle.tooling.internal.consumer.connection.InternalBuildActionAdapter.execute(InternalBuildActionAdapter.java:79)
	at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner$ActionRunningListener.runAction(ClientProvidedPhasedActionRunner.java:120)
	at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner$ActionRunningListener.run(ClientProvidedPhasedActionRunner.java:110)
	at org.gradle.tooling.internal.provider.runner.ClientProvidedPhasedActionRunner$ActionRunningListener.buildFinished(ClientProvidedPhasedActionRunner.java:104)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.lang.Thread.run(Thread.java:748)



* Get more help at https://help.gradle.org

BUILD FAILED in 8m 33s

在这里插入图片描述







二、解决方案



核心报错信息 :

This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.2 or newer.

当前的 Android 支持插件无法打开该工程 , 将 Android Studio 升级到 4.2 4.2 4.2 以上的版本 ;

以上是关于错误记录AS 编译报错 ( Android Support plugin 版本太高 | 升级 Android Studio 到最新版本 )的主要内容,如果未能解决你的问题,请参考以下文章

错误记录Android Studio 编译报错 ( Android Gradle plugin requires Java 11 to run. You are currently using )

错误记录Android Studio 编译报错 ( Installed Build Tools revision 31.0.0 is corrupted )

错误记录Android Studio 编译时 lint 检查报错 ( WARNING: DSL element ‘android.dataBinding.enabled‘ is obsolet )

错误记录Android Studio 编译时 lint 检查报错 ( Could not resolve junit:junit:4.+. )

错误记录Android Studio 编译报错 ( SDK location not found )

错误记录Android 编译时技术报错 ( 注解处理器 process 方法多次调用问题 )