I get an error after adding 'com.firebaseui:firebase-ui-auth:1.0.0' to the dependency. The error goes away when I delete 'com.firebaseui:firebase-ui-auth:1.0.0' from the gradle. Code and pic included below Help please
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.a.chatapp"
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.firebaseui:firebase-ui:0.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
putting
//noinspection GradleCompatible
Solved my issue
Here exist an error!
Seeing this Examples include
'com.android.support:animated-vector-drawable:25.3.0'
and'com.android.support:mediarouter-v7:24.0.0'
Just add these codes in dependencies, make sure that versions are same.
Just update
build.gradle
file with this :-What you need to do is check the which library dependency version is conflicting you can track that library with Run androidDependancies like:
and then find that conflicting dependency and add those dependencies with updated versions in your gradle file.
The problem is that you use two (or more) different versions of the same dependency. The first one is specified in your gradle file and the other dependencies are used by library which you use (in this case firebase-ui probably).
You have more options here. At first you should try to update firebase-ui dependency. They usually keep their support dependecies updated so I guess that they use the same version of support libraries as you in their current master branch (I guess that you use the newest 'com.android.support:appcompat' version, right?). If the last version of firebase-auth doesn't use the current version of support libraries you can either downgrade your support libraries version so it will match their either you can create your own fork of firebase-auth and keep it updated on your own.
Add these lines of code in your
build.gradle (Module:app)
file at end:You must change
useVersion
from '25.3.1' to your current compile/implementation SDK version.NOTE:
If you are still using
compile
in your build.gradle file then replace it withimplementation
orapi
because compile support will be ended officially at the end of 2018.For more details you may refer:
Error: when I replace compile with implementation in gradle(dependency)
What's the difference between implementation and compile in gradle
well I have read comments some of them are good but Here is the simple solution for all just follow the video
mixing version can lead to runtime crashes
go to your gradle script -->build gradle(Module:app) and then add the implementaions as many as you can or according to requirement.
Difficult to explain here I just add the link so that for ease.