Android的工作室错误:(8,0)插件ID为'机器人'未找到 [英] Android Studio Error: (8, 0) Plugin with id 'android' not found

查看:359
本文介绍了Android的工作室错误:(8,0)插件ID为'机器人'未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了Android的工作室(0.6.1)在OS X(10.9.3)以及摇篮1.1采用的Brew(BREW安装摇篮)。但是,我不能让我的第一个世界,你好!项目......请帮我解决这个问题。

build.gradle:

  buildscript {
    库{
        mavenCentral()
    }
    依赖{
        类路径com.android.tools.build:gradle:0.11.+
    }
}

应用插件:'机器人'

库{
    mavenCentral()
}

安卓{
    compileSdkVersion 19
    buildToolsVersion '19 .1'
    defaultConfig {}
    productFlavors {}
}

依赖{
}
 

错误消息:

  

错误:(8,0)插件ID为'机器人'未找到

<一个href="http://stackoverflow.com/questions/21646502/getting-build-failed-with-an-exception-android-studio-0-4-3-and-0-4-4">Getting构建失败,出现异常的Andr​​oid工作室0.4.3和0.4.4 后和<一href="http://stackoverflow.com/questions/18153739/android-studio-plugin-with-id-android-library-not-found">Android演播室:插件id为机器人库未找到后没有解决问题...

<一个href="http://stackoverflow.com/questions/18153739/android-studio-plugin-with-id-android-library-not-found">Second后我联系返回此错误消息:

  

错误:该项目采用摇篮不受支持的版本。请   使用1.1​​0版。请指向一个支持的摇篮版本的   项目的摇篮设置,或在项目的摇篮包装(如   适用。)修正摇篮包装和   重新导入项目摇篮设置

解决方案

看来你已经错过了加android的摇篮插件依赖于依赖块。

这个替换上 buildScript 部分,并同步与摇篮项目

  buildscript {
    库{
        mavenCentral()
    }
    依赖{
        类路径com.android.tools.build:gradle:0.11.+
    }
 }

 应用插件:'机器人'

 安卓{
      compileSdkVersion 19
      buildToolsVersion '19 .1.0
      defaultConfig {
          的applicationIDYOUR_APP_PACKAGE
          的minSdkVersion 9
          targetSdkVersion 17
      }
      buildTypes {
          推出 {
            runProguard假
            proguardFiles getDefaultProguardFile('ProGuard的-android.txt'),'ProGuard的-rules.txt
          }
      }
      productFlavors {}
  }

  依赖{

   }
 

I have installed Android Studio (0.6.1) on OS X (10.9.3) and Gradle 1.1 using Brew (brew install gradle). However, I can't get my first Hello World! project... Please help me solve this issue

build.gradle:

    buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.11.+'
    }
}

apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 19
    buildToolsVersion '19.1'
    defaultConfig {}
    productFlavors {}
}

dependencies {
}

Error message:

Error:(8, 0) Plugin with id 'android' not found.

Getting Build failed with an Exception Android Studio 0.4.3 and 0.4.4 post and Android Studio: Plugin with id 'android-library' not found post does not solves the problem...

Second post I linked returns this error message:

Error:The project is using an unsupported version of Gradle. Please use version 1.10. Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.) Fix Gradle wrapper and re-import project Gradle settings

解决方案

It seems you have missed to add android gradle plugin dependency in dependencies block.

Replace the top buildScript section by this and sync your project with gradle

 buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.11.+'
    }
 }

 apply plugin: 'android'

 android {
      compileSdkVersion 19
      buildToolsVersion '19.1.0'
      defaultConfig {
          applicationId 'YOUR_APP_PACKAGE'
          minSdkVersion 9
          targetSdkVersion 17
      }
      buildTypes {
          release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
      productFlavors {   }
  }

  dependencies {

   }

这篇关于Android的工作室错误:(8,0)插件ID为'机器人'未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆