I keep getting errors when I try to sync my gradle. It has something to do with the SDK version. I would like to know which firebase dependcies fit to 25.3.1
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.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
//compile 'com.firebase:firebase-jobdispatcher:1.0.2'
//compile 'com.firebaseui:firebase-ui:0.5.2'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.firebaseui:firebase-ui-storage:1.2.0'
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should use 10.2.1 and 1.2.0 version .
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
Clean-Rebuild and Run .
// Getting a "Could not find" error? Make sure you have
// the
latest Google Repository in the Android SDK manager
Related
I'm trying to make my app use PreferenceFragmentCompat
My dependencies:
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.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:preference-v7:25.4.0'
compile 'com.android.support:preference-v14:25.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.google.firebase:firebase-ads:11.8.0'
compile 'io.github.kobakei:ratethisapp:1.2.0'
compile 'com.timehop.stickyheadersrecyclerview:library:0.4.3'
compile 'com.github.chrisbanes:PhotoView:2.1.3'
testCompile 'junit:junit:4.12'
}
What I newly added in:
compile 'com.android.support:preference-v7:25.4.0'
compile 'com.android.support:preference-v14:25.4.0'
The error is about the first dependency:
compile 'com.android.support:appcompat-v7:25.3.1'
It says:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.4.0, 25.3.1. Examples include com.android.support:animated-vector-drawable:25.4.0 and com.android.support:cardview-v7:25.3.1 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion.)
It's telling you exactly, all
com.android.support:**
Should use the same version
Change it to:
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:support-v4:25.4.0'
compile 'com.android.support:preference-v7:25.4.0'
compile 'com.android.support:preference-v14:25.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:support-vector-drawable:25.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.google.firebase:firebase-ads:11.8.0'
compile 'io.github.kobakei:ratethisapp:1.2.0'
compile 'com.timehop.stickyheadersrecyclerview:library:0.4.3'
compile 'com.github.chrisbanes:PhotoView:2.1.3'
Always use/update same support library version so replace your code with:
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.4.0'){force true}
compile ('com.android.support:design:25.4.0'){force true}
compile ('com.android.support:support-v4:25.4.0'){force true}
compile ('com.android.support:preference-v7:25.4.0'){force true}
compile ('com.android.support:preference-v14:25.4.0'){force true}
compile ('com.android.support:cardview-v7:25.4.0'){force true}
compile ('com.android.support:support-vector-drawable:25.4.0'){force true}
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.google.firebase:firebase-ads:11.8.0'
compile 'io.github.kobakei:ratethisapp:1.2.0'
compile 'com.timehop.stickyheadersrecyclerview:library:0.4.3'
compile 'com.github.chrisbanes:PhotoView:2.1.3'
testCompile 'junit:junit:4.12'
}
To get duplicate dependency report check this SO
I am getting the below error all of a sudden. The app was running fine till morning. Since then I have been getting this. I tried loading older commits from Git, however I am getting the same issue now. I can see that there's a duplicate entry of some class, but it is not very clear where. I have checked all of my libraries to locate the issue but in vain. Please help
Error:Execution failed for task
':app:transformClassesWithMultidexlistForDebug'.
> java.io.IOException: Can't write [C:\Users\Bluetie Backup 3
i5\Downloads\Bluetie_Android_NewDesign-
Development\Bluetie_Android_NewDesign-Development\BlueTieAndroid-
master\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't
read [C:\Users\Bluetie Backup 3 i5\.gradle\caches\transforms-1\files-
1.1\support-core-ui-27.1.0.aar\781c80d72f0634c3cfc30b7ab8014102\jars\classes.jar(;;;;;;**.class)]
(Duplicate zip entry[classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))`
I have used a lot of Libraries as my app is very UI centric.
Here's the build.gradle file
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 project(':rtp')
compile project(':pageIndicator')
compile files('libs/linkedin-j-android.jar')
//compile files('libs/commons-codec-1.3.jar')
//compile files('libs/signpost-core-1.2.1.1.jar')
compile project(':imagepicker')
compile project(':swipflingview')
compile project(':linkedin-sdk')
compile 'com.android.support:multidex:1.0.2'
//noinspection GradleCompatible
compile 'com.google.firebase:firebase-core:11.0.2'
compile 'com.google.firebase:firebase-crash:11.0.2'
/* compile 'com.google.firebase:firebase-auth:11.0.2'*/
compile 'com.google.android.gms:play-services-analytics:11.0.2'
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.android.gms:play-services-location:11.0.2'
/*compile 'com.google.android.gms:play-services-ads:11.0.2'*/
compile 'com.google.android.gms:play-services-auth:11.0.2'
/* compile 'com.google.android.gms:play-services-gcm:11.0.2'*/
compile 'com.google.android.gms:play-services-places:11.0.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.okio:okio:1.0.1'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:design:26.1.0'
compile ('com.facebook.android:facebook-android-sdk:4.6.0'){
exclude module: 'support-v4'
}
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.yalantis:ucrop:2.2.0'
compile 'com.appyvet:materialrangebar:1.3'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.makeramen:roundedimageview:2.3.0'
compile 'com.jsibbold:zoomage:1.1.0'
compile 'com.michaelmuenzer.android:ScrollableNumberPicker:0.2.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
compile ('com.nineoldandroids:library:2.4.0'){
exclude module: 'support-v4'
}
compile 'uk.co.samuelwall:material-tap-target-prompt:1.1.4'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.android.support:percent:26.1.0'
compile('com.github.ozodrukh:CircularReveal:1.1.1') {
transitive = true;
}
testCompile 'junit:junit:4.12'
compile project(':paralaxed_viewpager')
compile project(':tooltiplibrary'){
exclude module: 'support-v4'
}
compile project(':pinview_lib')
compile 'com.github.travijuu:numberpicker:1.0.7'
compile 'com.razorpay:checkout:1.4.1'
compile 'com.github.travijuu:numberpicker:1.0.7'
compile 'com.razorpay:checkout:1.4.1'
compile project(':country_code_picker_library')
compile 'com.github.satyan:sugar:1.5'
compile 'org.igniterealtime.smack:smack-android:4.1.6'
compile 'org.igniterealtime.smack:smack-tcp:4.1.6'
compile 'org.igniterealtime.smack:smack-im:4.1.6'
compile 'org.igniterealtime.smack:smack-extensions:4.1.6'
compile 'com.jackandphantom.android:circularprogressbar:1.2.0'
compile 'com.jaredrummler:material-spinner:1.2.4'
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.wonderkiln:camerakit:0.13.1'
compile 'com.droidninja:filepicker:2.1.2'
compile project(':autocompleteview')
compile 'com.appsflyer:af-android-sdk:4.8.7#aar'
compile 'com.android.installreferrer:installreferrer:1.0'
Just change the version of a dependency-
from
compile 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
to
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
Sync >> Clean >> Rebuild , and Done
In my case this changes fixed my issue.
This error appeared after Android released Support Library v27.1.0 (February 2018).
I think, this error is because of some dependencies used in the project.
compile 'com.another.library:1.2.3'
compile '.....'
Since every dependency is another project, with its own dependencies. Android tries to add all of these to the project, when building. If a dependency uses another version of a support library, this kind of conflicts or duplicates may occur.
Probably one of your dependencies has a line in its gradle file, declaring:
compile 'com.android.support:design:27.+'
which means "use the newest release of v.27".
When v.27.1.0 has been released your own compile 'com.android.support:...:26.1.0' lines caused a duplicate.
To solve this out:
You can either update your own dependencies to the new version
or
-if you are able to find- you can exclude the support libraries from the dependency using v.27.1.0:
compile('com.another.library:1.2.3') {
exclude group: 'com.android.support', module: 'support-v13'
}
Change the dependency version
Use this
implementation 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
instead of
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.+'
Error:(66, 30) error: package PhoneAuthProvider does not exist
This is my app build.gradle
P.S multidex enabled is true
Why this error happens?
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'
})
// this line must be included to integrate with Firebase
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.firebase:firebase-storage:10.2.0'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.github.barteksc:android-pdf-viewer:2.5.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.kenglxn.QRGen:android:2.2.0'
compile 'me.dm7.barcodescanner:zxing:1.9'
compile 'com.google.zxing:core:3.2.1'
compile 'com.dlazaro66.qrcodereaderview:qrcodereaderview:2.0.1'
compile 'com.afollestad.material-dialogs:core:0.9.4.5'
compile 'com.github.clans:fab:1.6.2'
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.github.chrisbanes:PhotoView:2.0.0'
compile 'me.grantland:autofittextview:0.2.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.theneura:android-sdk:+'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Use :
compile 'com.google.android.gms:play-services-auth:11.0.2'
Instead of :
compile 'com.google.android.gms:play-services-auth:10.2.0'
the phone authentication was released with Firebase Android SDK v11 you need to update your auth module to 11.0.2 instead of 10.2.0
/The above part of the code is there in the actual program/
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.2.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:appcompat-v7:25.2.0'
// Google
compile 'com.google.android.gms:play-services-auth:10.2.0'
// Firebase
compile 'com.google.firebase:firebase-database:10.0.0'
compile 'com.google.firebase:firebase-auth:10.0 .0'
compile 'com.google.firebase:firebase-config:10.0.0'
compile 'com.google.android.gms:play-services-appinvite:10.2.0'
compile 'com.google.firebase:firebase-messaging:10.0.0'
compile 'com.google.android.gms:play-services-ads:10.2.0'
compile 'com.google.firebase:firebase-crash:10.0.0'
compile 'com.google.firebase:firebase-appindexing:10.0.0'
// Firebase UI
compile 'com.firebaseui:firebase-ui-database:0.4.0'
// Testing dependencies
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support:support-annotations:25.2.0'
compile 'com.google.android.gms:play-services-appindexing:10.0.0'
}
apply plugin: 'com.google.gms.google-services'
Well If you look at releases, there isn't a 10.0.0 version. Only 10.0.1 and the recommended 10.2.0.
Also looking at the setup guide, app indexing isn't listed as one of the individual packages gps offers (though I'm not saying definitively that it does not exist), so maybe you should use the core package.
compile 'com.google.android.gms:play-services:10.2.0'
Hil all,
this my error :
Error:Class android.support.v4.app.ActivityCompatHoneycomb has already
been added to output. Please remove duplicate copies.
and my dependecies are :
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('com.android.support:support-v4:22.0.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile ('com.google.android.gms:play-services:7.0.0')
compile 'com.squareup.picasso:picasso:2.5.2'
compile files('libs/json-simple-1.1.1.jar')
compile files('libs/ormlite-android-4.45.jar')
compile files('libs/ormlite-core-4.45.jar')
compile files('libs/jackson-databind-2.1.4.jar')
compile files('libs/jackson-core-2.1.4.jar')
compile files('libs/jackson-annotations-2.1.4.jar')
compile files('libs/httpmime-4.1.jar')
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile files('libs/paralloidviews.jar')
compile files('libs/jsr250-api-1.0.jar')
compile project(':volley')
compile project(':Android-RSS-Reader-Library-master')
compile project(':facebook')
compile project(':Forecast')
compile project(':headerListView')
compile project(':library-sliding-menu')
compile files('libs/panoramagl.jar')
compile project(':paymentKit_lib')
compile project(':ProgressWheel-master')
compile project(':UIL_library')
compile files('libs/coverflowlibrary.jar')
}
so where I could find the duplacte copies, can you help me please, I struggle with this error a long time ago !
This is most probably happening because one of your library projects already contains support-v4. Try to remove compile('com.android.support:support-v4:22.0.0') from your dependencies and check. This should solve the problem