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.
Related
I'm using Jenkins to build my android application.
But I'm facing below error
FAILURE: Build failed with an exception.
What went wrong: Task 'clean' not found in root project 'ProjectName'.
Tried this solution but unable to solve my unable
Stackoverflow Solution
Below is my build.gradle
apply plugin: 'com.android.application'
apply plugin:'base'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.xyz.xxx"
minSdkVersion 15
targetSdkVersion 23
versionCode 12
versionName "1.0.2"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
dexOptions {
jumboMode true
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.3.0'
compile files('libs/guava-r09.jar')
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile project(':library')
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}
that is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.mabna.hearthurt"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:support-v4:23.1.0'
// compile 'com.github.traex.rippleeffect:library:+'
// compile 'com.balysv:material-ripple:1.0.2'
compile 'com.squareup.picasso:picasso:2.5.0'
}
but this error occured:
error(32,13) failed to resolve: com.squareup.picasso:picasso:2.5.1
also for:
compile 'com.github.traex.rippleeffect:library:+'
compile 'com.balysv:material-ripple:1.0.2'
and other external dependencies error occured.
i have sample of com.github.traex.rippleeffect:library:+ and com.squareup.picasso:picasso:2.5.1 and other dependencies compiled with no error.
so what is the problem
At First Remove + calling from Gradle
Do
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'com.android.support:appcompat-v7:23.1.0' // Instead yours
Edit
Call multiDexEnabled true
defaultConfig {
// Enabling multidex support.
multiDexEnabled true
}
Then Clean-Rebuild-Sync in your Project.
Dependencies is a virtual folder where IDE shows what JAR files the
project depends on.
#Solivan I guess it's packaging bug . Whenever you create a new project then this bugs omitted .
I started to work with Gradle. And when I add this code into build.gradle;
compile 'com.android.support:appcompat-v7:+'
Im getting this error:
"Dependency 'com.android.support:appcompat-v7:+' Not Found"
So, how can I add appcompat support to my project?
My build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.0"
defaultConfig {
applicationId "my.project.package"
minSdkVersion 9
targetSdkVersion 21
versionCode 3
versionName "1.27"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:appcompat-v7:+'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/jsoup-1.8.3.jar')
}
I am doing Facebook Integration and got the following error :
Error:Execution failed for task ':app:processDebugResources'.
> Error: more than one library with package name 'com.facebook'
You can temporarily disable this error with`android.enforceUniquePackageName=false
However, this is temporary and will be enforced in 1.0`
You can check my build.gradle file is as follows,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.zaptech.latestfacebookintegration"
minSdkVersion 17
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'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile project(':facebook')
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
}
Whats the problem is ? Please let me know about it.
You have to remove
compile project(':facebook')
from build.gradle
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.