2016-03-04 61 views
0

其實我導入項目在Android Studio中,並且運行後這個項目,然後提示錯誤找不到id爲'com.android.application'的插件。在Mac機器人工作室

插件ID爲「com.android.application找不到。

我使用凌空庫也面料

我是新來的Android工作室,請幫助解決這個問題

我的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:[email protected]') { 
     transitive = true; 
    } 
    compile('com.crashlytics.sdk.android:crashlytics-ndk:[email protected]') { 
     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 
} 

回答

0

您忘記了包含標準存儲庫。

你需要組織你的版本庫這樣的部分:

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

而且你可以隨時使用GitHub sources search查看其他人怎麼用面料。

相關問題