Error:(1, 0) Plugin with id 'com.android.application' not found
从github上下载了一个工程,导入Android studio的时候就报了Error:(1, 0) Plugin with id 'com.android.application' not found这个错。
在*这个网站上找到了解决的方法。如下方截图所示。
网址:https://*.com/questions/24795079/error1-0-plugin-with-id-com-android-application-not-found
我的这个报错的工程比较奇怪,里面只有一个build.gradle。
于是我就在这个build.gradle中添加上方截图的代码。
- buildscript{
- repositories{
- jcenter()
- }
- dependencies{
- classpath "com.android.tools.build:gradle:2.3.3"
- }
- }
添加的代码就在红框里。
但是点击一下gradle按钮后,又出现了其他的错误。
于是又百度了一下Failed to resolve: junit:junit:4.12。
又在*上找到了答案。网址如下:https://*.com/questions/32519219/error23-17-failed-to-resolve-junitjunit4-12
我添加的位置如下:
上面截图中红框的代码如下:
- repositories {
- maven { url 'http://repo1.maven.org/maven2' }
- }
再gradle一下,bug就没了。就是这么简单。