【问题标题】:Plugin with id 'com.android.application' not found. in mac android studio未找到 ID 为“com.android.application”的插件。在 mac 安卓工作室
【发布时间】:2016-03-04 09:47:46
【问题描述】:

实际上我在android studio中导入项目,然后运行这个项目然后它给出了错误

未找到 ID 为“com.android.application”的插件。

我正在使用凌空库和织物

我是android studio的新手,所以请帮忙解决这个问题

我的 build.gradle 文件是

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}
 }
 apply plugin: 'com.android.application'
 apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}


  android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
    applicationId 'com.rozgari.techequity.rozgari'
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 12
    versionName '2.0.0'
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
productFlavors {
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile project(':volley')
compile('com.crashlytics.sdk.android:crashlytics:2.5.5@aar') {
    transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.2@aar') {
    transitive = true;
}
  }

 crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}

顶级构建文件是

  buildscript {
repositories {
    jcenter()
 }
 dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'

    // NOTE: Do not place your application dependencies here; they          belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

【问题讨论】:

    标签: android android-studio android-gradle-plugin


    【解决方案1】:

    您忘记包含标准存储库。

    您需要像这样组织您的存储库部分:

    repositories {
        jcenter()
        mavenCentral()
        maven { url 'https://maven.fabric.io/public' }
    }
    

    您可以随时使用GitHub sources search 来查看其他人如何使用 Fabric。

    【讨论】:

      猜你喜欢
      • 2021-12-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-05-13
      • 1970-01-01
      • 2019-01-02
      • 2020-02-17
      相关资源
      最近更新 更多