Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 497 Vote(s) - 3.42 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error:(1, 0) Plugin with id 'com.android.application' not found

#1
This is my first attempt at Android Studio. I installed 0.8.0 and updated to 0.8.2. As soon as a project is created I get the error message:

> Error:(1, 0) Plugin with id 'com.android.application' not found

C:\Users\Bob\AndroidStudioProjects\HelloAgain6\app\build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
applicationId "com.example.bob.helloagain6"
minSdkVersion 15
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}

and C:\Users\Bob\AndroidStudioProjects\HelloAgain6\build.gradle

// 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:0.12.+'

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

allprojects {
repositories {
jcenter()
}
}
Reply

#2
This can happen if you miss adding the Top-level build file.

Just add **build.gradle** to top level.

It should look like this
-----------------------------------------------

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

allprojects {
repositories {
mavenCentral()
}
}

-----------------------------------------------
Reply

#3
I was using IntelliJ IDEA 13.1.5 and faced with the same problem after I changed versions of Picasso and Retrofit in `dependencies` in `build.gradle` file. I tried use many solutions, but without result.
Then I cloned my project from remote git (where I pushed it before changing versions of dependencies) and it worked! After that I just closed current project and imported old project from Gradle file to IntelliJ IDEA again and it worked too! So, I think it was strange bug in intersection of IDEA, Gradle and Android plugin. I hope this information can be useful for IDEA-users or anyone else.
Reply

#4
This just happened to me using ***Android Studio 1.3.2***, however, since I had just created the project, I deleted it and created it again.<br/>
It seems that it had not been properly created by Android Studio the first time, not even the project folders where as expected.
Reply

#5
I am writing this not as a solution meant for many, but for ***some people who may commit a simple mistake like specifying the wrong url for importing projects from SVN***. It is intended for those guys :)

This happened to me when I imported the project from SVN -> automatic prompt by Studio to open the project -> It asked for Gradle location -> D:\Software\Android\gradle-2.5 -> Then the error.

The same project in a different SVN branch works fine with the Gradle plugin and Gradle which I have configured in Studio. I tried changing Android Gradle plugin and Gradle to get it working on the erring branch without any success.

Finally, I figured out that it was my following mistake:
I tried importing a specific Application alone instead of importing the application along with dependent library projects.
The url which I used for import initially had the Application porject's name at the end. Once I removed it, and specified the parent directory which contained both application project and its dependent project, everything went smooth :)
Reply

#6
module app build.gradle file

apply plugin: 'com.android.application'

model{


android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig.with {
applicationId "com.iamsafe"
minSdkVersion 15
targetSdkVersion 23





}
buildTypes {
debug {
minifyEnabled = false
useProguard = true
proguardFiles.add(file('proguard-rules.txt'))


}
}



}

}



dependencies {
compile 'com.android.support:support-v4:23.0.2'
compile files('libs/asmack-android-8-0.8.10.jar')
compile files('libs/commons-io-2.0.1.jar')
compile files('libs/httpclient-osgi-4.2.1-sources.jar')
compile files('libs/httpcore-4.3.2.jar')
compile files('libs/httpmime-4.1.2.jar')
}


project build.gradle

// 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:2.10'
}
}

allprojects {
repositories {
jcenter()
}
}

Reply

#7
If you run a the module task with android plugin 1.2.3 in module directory , the problem appears. Try this:

../gradlew -b ../build.gradle -c ../settings.gradle :module:xxx
Reply

#8
Go to your grade file where you can see this:

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


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
And change `classpath` to this:

buildscript {
repositories {
jcenter()
}
dependencies {
// classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.android.tools.build:gradle-experimental:0.7.0-alpha1'

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

#9
Root-gradle file:

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

allprojects {
repositories {
jcenter()
}
}

Gradle-wrapper.properties file:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-x.x-all.zip
Reply

#10
Make sure your two build.gradle and settings.gradle files are in the correct directories as stated in

[To see links please register here]


Then open "as existing project" in Visual Studio

Gradle is very finicky about this.
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through