Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Plugin with id 'android' not found (Android Studio)

I recently just switched to Android Studio 0.6.1 for app dev and I ran into an issue with gradle.

I get "Error:(1, 0) Plugin with id 'android' not found. I am quite new so any help would be appreciated.

Here is my build.gradle file:

apply plugin: 'android'

android {

    compileSdkVersion 19
    buildToolsVersion "19.1.0"

    defaultConfig {
        applicationId "com.b3dog.helloagain"
        minSdkVersion 15
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    compile fileTree(dir: 'libs', include: ['*.jar'])
}
like image 322
b3dog Avatar asked Sep 26 '26 16:09

b3dog


1 Answers

enter image description here

this issue appears in my android studio 0.6.1 canary build so after a week struggling i found whats wrong with new studio version . its not about Gradle as far as i see . and it happen to some people and you know why ? because some people specially junior developer accidentally proceeding in way that this error occur just after create new project . problem came from name of your activity let me explain it to your step by step

now , when u create new project , wizard appear and here's your step :

first : you enter application name second : select your minimum sdk third : type of your activity forth : your activity name

here's the point . if you choose the system default"my activity

enter image description here

error will occur but if you change it to your own custom name such as "myListactivity" or any other custom One . this error will no longer exist .

like image 164
afra mehrparvar Avatar answered Sep 28 '26 04:09

afra mehrparvar