Gradle sync failed: Gradle DSL method not found: 'minSdkVersdion(). I am using latest version of Android studio 2.0.
Here is my updated gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId 'com.gkhindi'
minSdkVersdion 16
targetSdkVersion 23
versionCode 1
versionName '1.0.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/StartAppInApp-3.1.0.jar')
compile files('libs/Shutterbug-1.0.0.jar')
compile files('libs/Parse-1.11.0.jar')
compile files('libs/bolts-tasks-1.3.0.jar')
// compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-games:8.4.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-analytics:8.4.0'
}
android {
useLibrary 'org.apache.http.legacy'
}
This is my final gradle. When i syn the gradle then I am receiving the error is 'Gradle sync failed: Gradle DSL method not found: 'minSdkVersdion()'.
There is a typo in your build.gradle
minSdkVersdion 16
instead of
minSdkVersion 16
Related
this is my gradle file
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.nuku.mc.populate_recyclerview"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
dexOptions {
incremental false
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
classpath "io.realm:realm-gradle-plugin:0.88.3"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.android.support:cardview-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.squareup.retrofit2:retrofit:2.0.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.0'
compile 'com.mcxiaoke.volley:library:1.0.17'
compile 'com.github.bumptech.glide:glide:3.5.2'
}
}
1)I tried to compile
2) I tried removing this line ->
classpath 'com.android.tools.build:gradle:2.0.0'
3) I tried without the build script{...} and added classpath with my other dependencies but it's still saying:
and my gradle is saying:
Error(2,0) plugin with id 'realm-andoid' not found
Add the following line to your app module build.gradle file.
apply plugin: 'realm-android'
And and these lines to the project level build.gradle file.
dependencies {
classpath "io.realm:realm-gradle-plugin:1.1.0"
}
But it seems you add all of them in your app module build.gradle file.
When I sync the gradle files it is showing the error :
Error:(26, 0) Gradle DSL method not found: 'ompile()'
Possible causes:The project 'Athletto' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
I searched for various solutions but none of them worked.I don't know which plugin I have to use.Here are my gradle files :
build.gradle (Module ) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.hp.athletto"
minSdkVersion 16
targetSdkVersion 16
multiDexEnabled=true
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'
ompile 'com.android.support:design:23.0.1'
compile 'com.github.vajro:MaterialDesignLibrary:1.6'
compile 'com.android.support:cardview-v7:23.2.0'
compile('com.github.afollestad.material-dialogs:commons:0.8.5.6#aar') {
transitive = true
}
}
build.gradle ( Project) :
// 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.1.0-alpha1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
You have a typing error: change ompile to compile 'com.android.support:design:23.0.1' on line 3 of dependencies.
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.1'
ompile 'com.android.support:design:23.0.1'//<--error here
compile 'com.github.vajro:MaterialDesignLibrary:1.6'
compile 'com.android.support:cardview-v7:23.2.0'
compile('com.github.afollestad.material-dialogs:commons:0.8.5.6#aar') {
transitive = true
}
}
i am getting the above error while importing the library from "compile 'com.github.jiahuanyu:PopSeekbar:0.2.3'" this dependency,
error:
Error:(27, 13) Failed to resolve: com.github.jiahuanyu:PopSeekbar:0.2.3
Show in File<br>Show in Project Structure dialog
i am struck with this, please help me...
My build.gradle content.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.admin.shopunter_user"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services:6.5.87'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'org.immutables:gson:2.1.0.alpha'
compile 'com.h6ah4i.android.widget.verticalseekbar:verticalseekbar:0.5.2'
compile 'com.google.maps.android:android-maps-utils:0.4+'
compile 'com.android.support:design:23.0.1'
compile 'com.github.jiahuanyu:PopSeekbar:0.2.3'
compile 'com.android.support:support-v4:23.0.1'
compile 'cz.msebera.android:httpclient:4.3.6'
compile 'com.android.support:recyclerview-v7:+'
}
Just add this in your build.gradle
dependencies {
compile 'com.github.jiahuanyu:PopSeekbar:0.2.3'
}
Then
Build > Clean Project Then Build > Rebuild Project
Then Click Invalidate Caches/Restart Options And Do Gradle (Sync)
I add this to buildscript{} to solve the problem.
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
I get this error during gradle build when importing a project in android studio o.8.14
Gradle DSL method not found: 'android()''
I know the error has something to do with the gradle files but I don't know the way forward or where exactly to start.
The top level build.gradle file looks like this
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.9.+'
}
}
allprojects {
repositories {
mavenCentral()
}
}
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile 'com.android.support:support-v4:+'
compile 'com.google.android.gms:play-services:+'
}
And the module build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion '20.0.0'
defaultConfig {
applicationId "com.shimba.android.events"
minSdkVersion 9
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'])
compile 'com.android.support:appcompat-v7:19.+'
compile project(':universalImageLoaderLibrary2')
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:support-v4:20.+'
}
Where am I going wrong?
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.8.+'
}
}
dependencies {
compile 'com.android.support:appcompat-v7:19.0.+'
compile 'com.android.support:support-v4:19.0.+'
compile 'com.github.chrisbanes.actionbarpulltorefresh:library:+'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile project(':library:SlidingMenu:library')
compile project(':library:Android-ViewPagerIndicator:library')
compile fileTree(dir: 'libs', include: ['*.jar'])
}
apply plugin: 'android'
android {
compileSdkVersion 19
buildToolsVersion "19.0.1"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
Event Log
Failed to refresh Gradle project 'My Application' Could not find method compile() for arguments [com.android.support:appcompat-v7:19.0.+] on project ':app'. Please install the Android Support Repository from the Android SDK Manager.