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.
Related
Error:A problem occurred configuring project ':app'.
Could not find support-v4.jar (com.android.support:support-v4:24.0.0).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/24.0.0/support-v4-24.0.0.jar
But i have not used 24.0.0 version
Check the gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 14
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "com.XXX.app"
minSdkVersion 14
targetSdkVersion 19
versionCode 2
versionName "2.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'
}
} }
dependencies {
provided fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:+'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile project(':actionbarsherlock')
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.android.support:support-v4:23+' }
Just Delete the dependencies:
compile 'com.android.support:support-v4:24.0.0'
I do not know why, but my project works.
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
I found a solution in this post. But it's old and does not work for latest version.
I tried this:
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
Repositories {
Maven {
url 'https://download.01.org/crosswalk/releases/crosswalk/android/maven2'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'org.xwalk:xwalk_core_library:13.42.319.11'
//compile ('com.github.florent37:materialviewpager:1.0.1#aar'){
// transitive=true
//}
compile project(':materialviewpager')
}
But I got this error:
Error:A problem occurred configuring project ':sample'.
Could not resolve all dependencies for configuration ':sample:_debugCompile'.
Could not resolve org.xwalk:xwalk_core_library:13.42.319.11.
Required by:
MaterialViewPager-master:sample:unspecified
Could not parse POM https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library/13.42.319.11/xwalk_core_library-13.42.319.11.pom
Already seen doctype.
I'm trying to reference SpotifyWebApi in AndroidStudio. I'm using the instructions here
https://github.com/kaaes/spotify-web-api-android/blob/master/README.md
However I get the error
Error:Failed to resolve: :spotify-web-api-android-0.1.0:
when I try to build.
How can I fix this? I have AndroidStudio 1.2.2
Here's my Module:app build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "app.com.example.android.spotifystreamerstage1"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
mavenCentral()
flatDir {
dirs 'libs'
}
}
dependencies {
compile(name:'spotify-web-api-android-0.1.0', ext:'aar')
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.2.0'
// Other dependencies your app might use
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
}
spotify-web-api-android is not included maven central repository. the doc of the link has wrong info. I don't know why..
Alternatively I have found this link and next codes.
repositories {
maven {
url "https://github.com/z0lope0z/raws/raw/master"
}
mavenCentral()
}
dependencies {
compile 'kaaes.spotify.webapi.android:spotify-web-api-android:0.1.0'
}
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?