I facing the problem when i update the gradle version from 24.2.1 to 25.0.1
and that the following error shown .
Error:(66, 13) Failed to resolve:
com.android.support:support-v7:25.0.1
Install Repository and sync project
Show in File
Show in Project Structure dialog
My gradle (app) I have update my code 24.2.1 to 25.01
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.teledaktar"
multiDexEnabled true
minSdkVersion 16
targetSdkVersion 23
versionCode 22
versionName "1.22.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
manifestPlaceholders = [HOCKEYAPP_APP_ID: "f2980c21293944029650fe21bb727599"]
}
aaptOptions {
cruncherEnabled = false
}
lintOptions {
checkReleaseBuilds false
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
// compile 'com.android.support:appcompat-v7:24.2.1'
// compile 'com.android.support:design:24.2.1'
// compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.firebase:firebase-client-android:2.5.2'
compile 'com.google.firebase:firebase-messaging:9.6.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.android.support:palette-v7:25.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'com.android.support:support-v7:25.0.1'
compile 'com.google.android.gms:play-services:9.6.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.mxn.soul:flowingdrawer-core:1.2.5'
compile 'com.nineoldandroids:library:2.4.0'
compile 'es.voghdev.pdfviewpager:library:1.0.1'
compile 'com.github.ceryle:RadioRealButton:v1.4.3'
compile 'com.rm:rmswitch:1.2.1'
compile 'com.github.recruit-lifestyle:WaveSwipeRefreshLayout:1.6'
compile "com.daimajia.swipelayout:library:1.2.0#aar"
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.github.arimorty:floatingsearchview:2.0.3'
compile 'org.jsoup:jsoup:1.10.1'
compile 'com.github.rampo.updatechecker:library:2.1.8'
compile 'com.github.danielemaddaluno.androidupdatechecker:library:1.0.2'
compile 'com.github.d-max:spots-dialog:0.4#aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.github.paolorotolo:appintro:4.1.0'
compile 'net.hockeyapp.android:HockeySDK:4.1.1'
compile 'com.thomashaertel:multispinner:0.1.1#aar'
}
apply plugin: 'com.google.gms.google-services'
and clashpath 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.3.0'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Has there any solution ? I have install for 25.01 and further same problem occurred .
Related
This question already has answers here:
Android dependency has different version for the compile and runtime
(18 answers)
Closed 3 years ago.
Error:Execution failed for task ':app:preDebugBuild'.
Android dependency 'com.google.android.gms:play-services-ads' has different version for the compile (11.8.0) and runtime (11.0.4) classpath. You should manually set the same version via DependencyResolution
My project gradle:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My module gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'com.bezets.cityappar'
minSdkVersion 16
targetSdkVersion 25
versionCode 4
versionName '1.3.0'
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "2g"
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE-FIREBASE.txt'
}
productFlavors {
}
lintOptions {
disable 'InvalidPackage'
abortOnError false
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'com.google.android.gms:play-services-ads:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:palette-v7:25.3.1'
compile 'com.jakewharton:butterknife:7.0.1'
compile files('libs/volley.jar')
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.google.android.gms:play-services-auth:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.maps.android:android-maps-utils:0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-crash:11.0.4'
compile 'com.google.firebase:firebase-ads:11.0.4'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp:2.3.0'
compile 'com.squareup:otto:1.3.6'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.paolorotolo:appintro:3.3.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
How can I fix it error?
My error is similar with yours, solved with these way.
Error is shown below :
Android dependency 'com.google.android.gms:play-services-tasks' has different version for thecompile (11.4.2) and runtime (15.0.1) classpath. You should manually set the same version via DependencyResolution
Then in file : android/build.gradle ,
I add this script :
allprojects {
...
configurations.all {
resolutionStrategy.force "com.google.android.gms:play-services-
tasks:15.0.1"
}
}
Please see this answer
You can solve it in one of two ways: Define a resolution strategy or include the offending version in your dependencies.
Hope this helps!
Set all Google/Firebase dependency to Same version 11.8.0
I am having this problem when i run my project in my device, note that this Error does not show up during gradle sync, but only when i run project.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/location/places/zzl.class
this my app/build gradle:
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "il.co.dotech.constinspect"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.schibstedspain.android:leku:2.3.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.google.android.gms:play-services-auth:11.8.0'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
//compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile'com.android.support:recyclerview-v7:25.0.0'
compile 'com.github.medyo:fancybuttons:1.8.2'
compile 'com.github.Mariovc:ImagePicker:1.0.4'
compile 'com.github.clans:fab:1.6.4'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'org.json:json:20160212'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile'com.daimajia.swipelayout:library:1.2.0#aar'
compile 'com.mobsandgeeks:android-saripaar:2.0.3'
compile 'com.mikepenz:actionitembadge:3.3.1#aar'
compile 'com.mikepenz:iconics-core:2.8.1#aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0#aar'
testCompile 'junit:junit:4.12'
compile files('libs/gson-1.7.1.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
apply plugin: 'com.google.gms.google-services'
and this is my build gradle:
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Try adding this line in your app/build gradle dependencies:
compile 'com.google.android.gms:play-services-places:11.8.0'
I am working on a project using Firebase, but after updating the versions, I receive an error for 'import com.firebase.client.Firebase;'.
I cleaned the project, rebuilt, and deleted from local and imported from github where I stored the information.
Here is my build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
maven {url 'https://jitpack.io'}
maven {url 'https://maven.google.com'}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and here is my build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.example.android"
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.maps.android:android-maps-utils:0.4.+'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.zxing:core:3.2.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.github.wdullaer:MaterialDateTimePicker:v3.0.0'
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
here is an error I have
screenshot of error
try following to adding this line in gradle file.
compile 'com.firebase:firebase-client-android:2.5.0'
I am using a recyclerview in my project. The project was using the following libraries:
com.android.support:appcompat-v7:23.4.0
com.android.support:design:23.0.0
com.android.support:support-v4:23.4.0
The recyclerview was functioning as it should, e.g. scrolling. I decided to update my project to use v7:25.0.0 of the same libraries in order to use the DiffUtil class for my adapter, associated with my recyclerview. Once I built and ran the project with the updated libraries, my recyclerview doesn't scroll anymore. I haven't integrated the DiffUtil class yet, so I know that isn't the problem. It seems it is to do with the updated libraries, as going back to the previous ones, makes my recyclerview scroll again. Your help would be most appreciated.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
jcenter()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
// replace with the current version of the Android plugin
classpath 'com.android.tools.build:gradle:2.3.3'
// the latest version of the android-apt plugin
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.6'
classpath 'com.google.gms:google-services:3.0.0'
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "http://dl.bintray.com/tbruyelle/tbruyelle" }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId 'com.example.exam'
minSdkVersion 15
targetSdkVersion 23
versionCode 29
versionName "1.3.8"
multiDexEnabled true
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
lintOptions {
abortOnError false
}
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
final STETHO = '1.4.1'
compile "com.facebook.stetho:stetho:$STETHO"
compile files('libs/classes.jar')
compile('io.branch.sdk.android:library:2.+') {
exclude module: 'answers-shim'
}
compile files('libs/Parse-1.10.1.jar')
compile files('libs/ParseFacebookUtilsV4-1.10.1.jar')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6#aar') {
transitive = true;
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.flaviofaria:kenburnsview:1.0.6'
compile 'com.github.android-s14:rve:1.1.4'
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.flaviofaria:kenburnsview:1.0.6'
compile 'com.github.android-s14:rve:1.1.4'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.eftimoff:android-pathview:1.0.6#aar'
compile 'com.github.jorgecastilloprz:fillableloaders:1.02#aar'
compile 'info.hoang8f:android-segmented:1.0.5'
compile 'com.pnikosis:materialish-progress:1.5'
compile 'me.relex:circleindicator:1.1.5#aar'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
compile 'com.google.code.gson:gson:2.3.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mcxiaoke.volley:library:1.0.18'
compile 'com.raizlabs.android:DBFlow-Core:2.2.1'
compile 'com.raizlabs.android:DBFlow:2.2.1'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.easing:library:1.0.1#aar'
compile 'com.daimajia.androidanimations:library:1.1.3#aar'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile 'com.android.support:design:25.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.tealium:library:5.0.4'
compile 'com.google.firebase:firebase-messaging:10.2.6'
compile 'com.google.firebase:firebase-core:10.2.6'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.0.0'
testCompile 'junit:junit:4.12'
apt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
}
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
I'm starting to work with room persistence
I added the room in the gradle and the error below appeared:
Error:Failed to resolve: annotationProcessor
href="openFile:C:/.../app/build.gradle">Open File
This error appears when I synchronize the gradle
How can I resolve this issue?
This is the 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.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
dataBinding {
enabled = true
}
defaultConfig {
applicationId "com.app.bob.app"
minSdkVersion 22
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:support-annotations:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.android.support:support-v4:25.3.0'
testCompile 'junit:junit:4.12'
compile 'com.android.support:recyclerview-v7:25.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton:butterknife:8.7.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.7.0'
compile 'com.android.support:cardview-v7:25.3.0'
compile 'android.arch.persistence.room:runtime: 1.0.0-alpha5'
annotationProcessor 'android.arch.persistence.room:compiler: 1.0.0-alpha5'
compile 'android.arch.lifecycle:runtime:1.0.0-alpha5'
compile 'android.arch.lifecycle:extensions:1.0.0-alpha5'
annotationProcessor 'android.arch.lifecycle:compiler:1.0.0-alpha5'
testCompile 'android.arch.persistence.room:testing:1.0.0-alpha5'
compile 'android.arch.persistence.room:rxjava2:1.0.0-alpha5'
}
Remove all whitespace from your compile values. IOW, replace:
compile 'android.arch.persistence.room:runtime: 1.0.0-alpha5'
annotationProcessor 'android.arch.persistence.room:compiler: 1.0.0-alpha5'
with:
compile 'android.arch.persistence.room:runtime:1.0.0-alpha5'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-alpha5'