firebaseUI dependency not matching with the firebase version 15.0.0 Actually what is happening is that, when I include the firebaseUI dependency , android studio shows some kind of error related to values.xml file. I have linked the picture of error below and when I remove that line everything works fine , then there is no error.
The code for the entire gradle file is given below:
apply plugin: 'com.android.application'
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
maven { url "https://maven.google.com" }
}
android {
compileSdkVersion 24
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.google.firebase.udacity.friendlychat"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
resConfigs "en"
}
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'])
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-database:15.0.0'
compile 'com.google.firebase:firebase-auth:15.0.0'
compile 'com.google.firebase:firebase-core:15.0.0'
compile 'com.firebaseui:firebase-ui-database:3.3.0'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
}apply plugin: 'com.google.gms.google-services'
ERROR:
The README at FirebaseUI's github repo is quite clear. You need to explicitly override all the transitive dependencies for each UI library e.g if you are using firebase-ui-auth version 3.3.0 but want to use firebase version 15.0.0 and support libaries version 27.1.1, it will be be something like below.
implementation 'com.firebaseui:firebase-ui-auth:3.3.0'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation "com.android.support:cardview-v7:27.1.1"
implementation 'com.android.support:design:27.1.1'
Try updating your setup, also firebase UI is still depedning in version 12.0.1 not 15.0.0. See the docs to see which versions match with which firebase ui versions:
apply plugin: 'com.android.application'
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
maven { url "https://maven.google.com" }
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.google.firebase.udacity.friendlychat"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
resConfigs "en"
}
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'])
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-database:12.0.1'
compile 'com.google.firebase:firebase-auth:12.0.1'
compile 'com.google.firebase:firebase-core:12.0.1'
compile 'com.firebaseui:firebase-ui-database:3.3.0'
compile 'com.android.support:design:27.1.1'
compile 'com.android.support:appcompat-v7:27.1.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
}
apply plugin: 'com.google.gms.google-services'
whatever the Firebase UI dependency you want to use, try adding below two dependencies.
It worked for me, this might work for you as well
implementation "android.arch.core:runtime:1.1.1"
implementation "android.arch.core:common:1.1.1"
Related
I am getting this error while compiling my code. My project build.gradle is:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.shubham.tommpas"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
//library required to display map
api 'com.tomtom.online:sdk-maps:2.+'
//library required for search
api 'com.tomtom.online:sdk-search:2.+'
//library required for routing
api 'com.tomtom.online:sdk-routing:2.+'
//library required for traffic
api 'com.tomtom.online:sdk-traffic:2.+'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.ankitdubey021:GPSTracker:2.0'
implementation "com.google.android.gms:play-services-maps:16.0.0"
implementation "com.google.android.gms:play-services-base:16.0.0"
implementation "com.google.android.gms:play-services-location:16.0.0"
implementation 'com.android.support:multidex:1.0.3'
}
What is the issue and how do I fix it?
add google() for repositories in gradle. if it is not there like below. If it is already there, it should be above than jcenter(). Please move it to up in both places. I also faced the same issue and this is how i fixed it.
buildscript {
repositories {
google()
jcenter()
}
......
....
allprojects {
repositories {
google()
jcenter()
}
}
try it by excluding com.google.android.gms from "com.github.ankitdubey021:GPSTracker" dependency. Because it also use this dependency and it will transitively add to your gradle. Most probably it is the reason for your problem. you can exclude it like below by changing "com.github.ankitdubey021:GPSTracker".
implementation('com.github.ankitdubey021:GPSTracker') {
exclude group: 'com.google.android.gms', module: 'play-services'
}
I have following dependencies in build.gradel file.
I am not using any kind of v4 library but ,
still it's giving "Failed to resolve: support-v4" error while i build the gradle.
I have already gone through these 2 links
"Failed to resolve: com.android.support:support-v4:26.0.0" and other similar errors on Gradle sync
Failed to resolve: com.android.support:support-v4:23.0.0
But can't find solution.
Here i have attached project structure image.
android {
compileSdkVersion 26
dataBinding.enabled = true
defaultConfig {
applicationId "XXX.XXXXXXX.XXXXXXXXXX"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dataBinding {
enabled = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
repositories {
maven { url "https://maven.google.com" }
}
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation "com.android.support:customtabs:26.1.0"
implementation 'com.android.support.constraint:constraint-
layout:1.0.2'
implementation 'com.android.support:design:26.+'
implementation 'com.android.support:cardview-v7:26.+'
implementation 'com.google.android.gms:play-services:10.2.1'
implementation 'com.android.support:multidex:1.0.0'
implementation 'com.google.firebase:firebase-messaging:10.2.1'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Please help me to get solved this issue.
Thanks in advance.
I have same problem and i'm change order of repositories in biuld.gradle (app) and problem solved.
Change :
jcenter()
google()
To :
google()
jcenter()
Hope it's help
Move repositories in the module build.gradle not in app build.gradle. It will solve your problem.
Please fix the version conflict either by updating the version of the
google-services plugin (information about the latest version is
available at
https://bintray.com/android/android-tools/com.google.gms.google-services/)
or updating the version of com.google.android.gms to 15.0.2.
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 26
// buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.test.android"
minSdkVersion 16
targetSdkVersion 22
signingConfig signingConfigs.config
versionCode 9
versionName '3.6'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
debug {
// signingConfig signingConfigs.config
}
}
packagingOptions {
// exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/maven/com.squareup.picasso/picasso/pom.xml'
}
productFlavors {
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':slidingmenu_libs')
implementation project(':sqlite_helper')
implementation files('libs/httpclient-4.2.5.jar')
implementation files('libs/httpcore-4.2.4.jar')
implementation files('libs/httpmime-4.2.1.jar')
implementation files('libs/lib-autonotifyviewpager.jar')
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation('com.twitter.sdk.android:tweet-composer:1.0.3#aar') {
transitive = true;
}
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.eftimoff:android-viewpager-transformers:1.0.1#aar'
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:customtabs:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.google.android.gms:play-services-plus:15.0.1'
implementation 'com.facebook.android:facebook-android-sdk:4.24.0'
implementation 'jp.wasabeef:recyclerview-animators:2.2.1'
implementation 'com.github.ksoichiro:android-observablescrollview:1.6.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.joanzapata.pdfview:android-pdfview:1.0.4#aar'
testImplementation 'junit:junit:4.12'
implementation('com.crashlytics.sdk.android:crashlytics:2.8.0#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
Update the google-service plugin to 'com.google.gms:google-services:3.3.0'
However, its always better to have same version among the same library file to prevent any project sync crash.
Example,
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-ads:15.0.2'
implementation 'com.google.android.gms:play-services-auth:15.0.2'
implementation 'com.google.android.gms:play-services-plus:15.0.2'
sometimes it happens when you updating google play services or firebase dependencies, you might solve it by updating the play service plugin in your build.gradle (project) file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
}
I know there are very similar questions asked previously but before I make any drastic changes I thought I would post the question here first.
This is the error I'm getting.
My build.gradle is like this
android {
compileSdkVersion 27
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.microsoft.graph.helpdesk"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
multiDexEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
}
configurations {
all {
resolutionStrategy.force 'com.android.support:support-annotations:23.4.0'
}
}
defaultConfig {
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
dependencies {
// Azure AD
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.github.baoyachi:StepView:1.9'
implementation 'com.github.vipulasri:timelineview:1.0.6'
compile(project(':o365-auth'))
// Dagger compiler for DI annotation support
annotationProcessor 'com.squareup.dagger:dagger-compiler:1.2.5'
provided('com.squareup.dagger:dagger-compiler:1.2.5')
// Butterknife
annotationProcessor 'com.jakewharton:butterknife:6.1.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.microsoft.graph:msgraph-sdk-android:1.1.0'
compile 'joda-time:joda-time:2.9.4'
compile 'com.google.guava:guava:19.0'
compile 'com.android.volley:volley:1.1.0-rc2'
compile 'com.android.support:design:27.0.2'
// Test libraries
androidTestCompile 'com.android.support:support-annotations:23.4.0'
//noinspection GradleCompatible
androidTestCompile 'com.android.support.test:runner:0.5'
androidTestCompile 'com.android.support.test:rules:0.5'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-intents:2.2.2'
androidTestCompile 'com.android.support.test.espresso:espresso-web:2.2.2'
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
apply plugin: 'com.google.gms.google-services'
I have tried all the other solutions I could find but nothing has worked so far.
If anyone has any help at all it would be much appreciated
[EDIT] I have actually tried to run three other projects using API 27 and I am getting the same error.
at project ':o365-auth' that helped me to compile it;
try adal latest version or design instead appcompat etc
dependencies {
// compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
// Dependency injection
compile 'com.squareup.dagger:dagger:1.2.5'
provided 'com.squareup.dagger:dagger-compiler:1.2.5'
// Azure AD
compile 'com.microsoft.aad:adal:1.12.0'
}
compile(project(':o365-auth'))
have similar issues;
prev on 23 and 23.0.3 all work good
tried upper gradle but same issues on 25 too
I'm using Firebase UI and when I try to run the app, the above error is displayed.
I've tried using multiple emulator with different configurations and also different versions of Play Services in my gradle. I haven't not been able to fix this error.
This is my app/build.gradle:
apply plugin: 'com.android.application'
repositories {
mavenLocal()
flatDir {
dirs 'libs'
}
}
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
defaultConfig {
applicationId "com.google.firebase.udacity.friendlychat"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
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'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:25.2.0'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.google.android.gms:play-services:11.4.0'
// Displaying images
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.google.firebase:firebase-auth:11.4.0'
compile 'com.google.firebase:firebase-core:11.4.0'
compile 'com.google.firebase:firebase-database:11.4.0'
compile 'com.firebaseui:firebase-ui-auth:2.4.0'
compile 'com.android.support:support-annotations:25.3.1'
}
apply plugin: 'com.google.gms.google-services'
The Emulator config is Nexus 5x Api 25 X86_64