0
I’m trying to use Firebase in my application, but it’s giving dependency error in Gradle.
Build.Radle (App)
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.juny.tinderx"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation"org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Build.Radle(project)
buildscript {
ext.kotlin_version = '1.2.30'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
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 {
google()
jcenter()
maven {
url "https://maven.google.com" // Google's Maven repository
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
That is the Mistake that:
Post your full Gradle!
– Loudenvier
I posted the full Gradle. Grateful!
– Juny
Probably some library you are using has been compiled with an older version of the google support libraries. We need to find out which has this dependency. For this I’ll ask you for more help. Open a grdle terminal and type:
./gradlew app:dependencies
then post in ask the result.– Loudenvier
The dependency tree exceeds the character limit, so I sent it to a link: https://pastebin.com/i4FSe58M
– Juny
Who is using the old support library is firebase! Are you using the newer version? I saw that in your Gradle is the 11.8, which is the youngest, but in the dependencies appears 11.6!!! Are you sure you are using this Radle? That there is nothing lost out there using older version? etc.
– Loudenvier