0

I use: android studio 1.5.1 java version "1.7.0_80"

I want to create a new android project as Min Api-version = 15

But android studio cannot create new application , a dialog is opened with this title : "Building 'MyApplication' Gradle project info" and its content is : a text: "Gradle: Resolve dependencies ':app:_debugCompile'" and a progressBar;

unfortunately this dialog is opened for long time,just now ...


I had some projects , but when I want to build gradle for them below error is shown to me :

Error:(3, 0) Gradle DSL method not found: 'android()'
Possible causes:The project 'e-project' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).

Fix plugin version and sync project The project 'e-project' may be using a version of Gradle that does not contain the method. openGradleSettings Gradle settings The build file may be missing a Gradle plugin.

"apply.gradle.plugin Apply Gradle plugin

Edit 1: I added build.gradle

apply plugin: 'application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.e_example.android.app"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
    compile 'com.android.support:support-v4:23.1.1'
    compile 'com.google.android.gms:play-services:8.4.0'

} 
Mojtaba
  • 382
  • 1
  • 3
  • 19
  • please check [this answer](http://stackoverflow.com/questions/26759755/error1-0-gradle-dsl-method-not-found-android) on SO. – Amit Vaghela Mar 08 '16 at 07:58
  • Post your build.gradle – Gabriele Mariotti Mar 08 '16 at 08:02
  • Checkout my answer [here](http://stackoverflow.com/questions/34984905/reset-default-gradle-and-plugin-for-android-studio-to-be-up-to-date-when-creatin/35219457#35219457). It may helps you. – pRaNaY Mar 08 '16 at 08:26
  • I add below text to Gradle file but now there is a new error: apply plugin: 'android' "plugin with id 'android' not found ." – Mojtaba Mar 08 '16 at 10:33
  • Check [this] question . I found answer for this question(http://stackoverflow.com/questions/36259307/gradle-cannot-resolve-dependencies-classpath-from-jcenter-in-android-studio) – Mojtaba Mar 28 '16 at 10:53

0 Answers0