2015-10-04 47 views
0

我已經搜索並嘗試所有stackover流動方法它沒有幫助。Android studio 23.0.0 rc3錯誤|嘗試所有解決方案不工作

我得到這個

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

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

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

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

當我嘗試添加(22棒棒糖)& 23.0.1它顯示的gradle開放封裝文件 & 應用插件沒有什麼作品

Error:(19, 0) Gradle DSL method not found: 'android()' 
Possible causes:<ul><li>The project 'booook' may be using a version of Gradle that does not contain the method. 
<a href="open.wrapper.file">Open Gradle wrapper file</a></li><li>The build file may be missing a Gradle plugin. 
<a href="apply.gradle.plugin">Apply Gradle plugin</a></li> 


// Top-level build file where you can add configuration options common to all sub-projects/modules. 
buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:1.2.3' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 
allprojects { 
    repositories { 
     jcenter() 
    } 
} 

android { 
    compileSdkVersion 22 
    buildToolsVersion '23.0.1' 
} 
dependencies { 
} 


這就是我所得到的最終結果進行更改
http://s9.postimg.org/fzg0sie8v/image.png
http://s30.postimg.org/6eepfqxtd/image.png
http://s11.postimg.org/b6l12ec8z/image.png
http://s11.postimg.org/b6l12ec8z/image.png

回答

0

您是在頂級構建文件(該文件的第一行)
你之後應該在你的子項目中添加這個新內容(通常是app/build.gradle)

0

從頂級刪除這些行build.gradle

android { 
    compileSdkVersion 22 
    buildToolsVersion '23.0.1' 
} 
dependencies { 
} 

這是

Error:(19, 0) Gradle DSL method not found: 'android()'

的原因
相關問題