2016-09-08 16 views
0

私はアンドロイドアプリケーションで新しいです、私はアプリケーションをインポートし、私はこのエラーは何をすべきか分からない..誰かが私を助けることができます! 私のbuild.gradleファイルエラー:(18、0)引数のためのメソッドandroid()を見つけることができませんでした

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

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

    android { 
     compileSdkVersion 23 
      buildToolsVersion "23.0.0 rc3" 
       } 

があり、私のアプリ/ build.gradle

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 22 
buildToolsVersion "23.0.0 rc3" 

defaultConfig { 
    applicationId "com.codeandcoder.finalguide" 
    minSdkVersion 15 
    targetSdkVersion 22 
    versionCode 2 
    versionName "1.1" 
    } 
    buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
     } 
     } 

    dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.google.android.gms:play-services:7.5.0' 
    compile 'com.android.support:appcompat-v7:22.2.1' 
     } 
+0

正確にはどういう意味ですか? – ilham

+0

こんにちは@ilham、私は他のポストを探していた。私の間違い。 – r3x

答えて

0

移動は、このあります:

android { 
    compileSdkVersion 22 
    buildToolsVersion "23.0.0 rc3" 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.google.android.gms:play-services:7.5.0' 
    compile 'com.android.support:appcompat-v7:22.2.1' 
} 

module/build.gradle

+0

私のモジュール/ build.gradleに既にアンドロイドと依存関係があります – ilham

+0

あなたはあなたのプロジェクトのgradleではなく 'module/build.gradle'の中でそれらを使う必要があります – Seyyed

+0

プロジェクトgradleからそれらを削除すると、 (1、0)idが 'com.android.application'のプラグインが見つかりません。 – ilham

関連する問題