2016-07-27 25 views
0

這是我的gradle這個文件不管我做什麼我不能添加境界,我的項目

apply plugin: 'com.android.application' 
apply plugin: 'realm-android' 

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.3" 

    defaultConfig { 
     applicationId "com.nuku.mc.populate_recyclerview" 
     minSdkVersion 14 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
    } 
    dexOptions { 
     incremental false 
     javaMaxHeapSize "4g" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
buildscript { 
     repositories { 
      jcenter() 
     } 
     dependencies { 

      classpath 'com.android.tools.build:gradle:2.0.0' 
      classpath "io.realm:realm-gradle-plugin:0.88.3" 
     } 
    } 


    dependencies { 

     compile fileTree(dir: 'libs', include: ['*.jar']) 
     testCompile 'junit:junit:4.12' 
     compile 'com.android.support:appcompat-v7:23.0.1' 
     compile 'com.android.support:design:23.0.1' 
     compile 'com.android.support:cardview-v7:23.0.1' 
     compile 'com.android.support:recyclerview-v7:23.0.1' 
     compile 'com.android.support:multidex:1.0.1' 


     compile 'com.squareup.retrofit2:retrofit:2.0.0' 
     compile 'com.squareup.retrofit2:converter-gson:2.0.0' 
     compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0' 


     compile 'com.mcxiaoke.volley:library:1.0.17' 

     compile 'com.github.bumptech.glide:glide:3.5.2' 
       } 
} 

1)我試圖編譯

2)我試圖消除這一行 - > 類路徑「com.android.tools.build:gradle:2.0.0」

3)我沒有試過構建腳本{...}並添加類路徑與我的其他的依賴,但它仍然說:

和我gradle這個是說: 錯誤(2,0)的插件ID爲「的境界,andoid」未找到

+0

首先,檢查下面的@ hi-im-frogatto。其次,你的android gradle插件和Realm都是非常舊的版本,請試用新版本(android gradle插件和舊版Realm出現問題,請參閱https://github.com/realm/realm-java/issues/2348#issuecomment -189361216) – beeender

回答

0

以下行添加到您的應用模塊build.gradle文件。

apply plugin: 'realm-android' 

而且這些線的項目級別build.gradle文件。

dependencies { 
    classpath "io.realm:realm-gradle-plugin:1.1.0" 
} 

但似乎你全部添加您應用模塊build.gradle文件英寸

+0

我做了實際上做了所有這些事情,但仍然是相同的錯誤:( –

+0

謝謝我的問題解決了。再次閱讀文檔,我將所有這些添加到我的應用程序模塊文件。 –

相關問題