美文网首页
【Android】导入项目后出现Plugin with id ‘

【Android】导入项目后出现Plugin with id ‘

作者: hao_developer | 来源:发表于2023-07-09 10:56 被阅读0次

【Android】导入项目后出现Plugin with id ‘com.android.application’ not found.

原因:gradle还缺少配置;
如图:


image.png

解决方法:将以下代码放在build.gradle中,粘贴到最外层即可

buildscript {
     
        repositories {
            google()
            jcenter()
            mavenCentral()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.4.1'//版本可更改
        }
    }
     
    allprojects {
        repositories {
            google()
            jcenter()
            mavenCentral()
        }
    }

再次编译即可成功运行

相关文章

网友评论

      本文标题:【Android】导入项目后出现Plugin with id ‘

      本文链接:https://www.haomeiwen.com/subject/eghsudtx.html