Error while adding firebaseui dependency - android

I am trying to use FirebaseListAdapter and for it , it requires
dependency of com.firebaseui:firebase-ui-database:1.2.0 . But when I add this in my gradle file I am getting an error in
com.android.support:appcompat-v7:25.3.1
below are the screenshot and code for app.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.ashish.internchat"
minSdkVersion 16
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(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.constraint:constraint-layout:1.0.0-alpha8'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
}
apply plugin: 'com.google.gms.google-services'
This is the error I am getting:

You are using mismatching library versions. com.android.support:animated-vector-drawable is version 25.3.1 while your com.android.support:recyclerview-v7 is version 25.1.1. Using mismatched versions could cause your app to crash/errors. FirebaseUi must be using version 25.1.1.
Add the below to your apps gradle:
compile 'com.android.support:recyclerview-v7:25.3.1'

Related

Failed to resolve: com.google.android.support.gms:play-services-map:10.2.0

I am trying to use the features from Google to create a google map but when I tried to sync the project I got this error
This is the build.gradle file..
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.chamiya.bustracking"
minSdkVersion 16
targetSdkVersion 24
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(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// can update the Firebase
compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.support.gms:play-services-map:10.2.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Failed to resolve: com.google.android.support.gms:play-services-map:10.2.0
It happens because it doesn't exist:
Use:
compile 'com.google.android.gms:play-services-maps:x.x.x'
instead of
compile 'com.google.android.support.gms:play-services-map:10.2.0'
In any case in your build.gradle you have to change something:
you have to use the same version for the support firebase libraries and google play services libraries.
For example use the latest v11.8.0
compile 'com.google.android.gms:play-services:11.X.X'
compile 'com.google.firebase:firebase-database:11.x.x'
compile 'com.google.firebase:firebase-auth:11.x.x'
compile 'com.google.android.support.gms:play-services-map:11.x.x'
Update your compileSdkVersion
Use a compatibile version of the firebase-ui library.
Remove the apply plugin: 'com.google.gms.google-services' at the top of the file.

Unable to merge dex on Run Android App

i try run my application but suddenly arise this error
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
then i try searching and try that solution but all solution is not worked
help me :(
here is my .gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
defaultConfig {
applicationId 'com.inhatc.jh.yourplaylist'
minSdkVersion 20
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'
}
}
useLibrary 'org.apache.http.legacy'
productFlavors {
}
}
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'
})
compile files('libs/jaudiotagger-2.2.4-SNAPSHOT.jar')
compile files('libs/glide-3.4.0.jar')
compile files('libs/google-api-services-youtube-v3-rev183-1.22.0.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
// Google Api Client library and Android extension
compile 'com.google.api-client:google-api-client-android:1.22.0'
// Change to the API you want to access:
// Below is just an example for People REST API access
compile 'com.google.apis:google-api-services-people:v1-rev4-1.22.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
today solved my problem
i miss lib/.jar files and .gradle dependencies

PHONE_VERIFICATION_PROVIDER in Firebase AuthUI not woiking

Phone verification in my android application is not working. when i am adding AuthUI.PHONE_VERIFICATION_PROVIDER, the editor showing that cannot resolve symbol. Other verification method like Google or email are working fine.
Here is the screen-shot for this:
Here is Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.example.nishant.kitchenbook"
minSdkVersion 21
targetSdkVersion 23
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(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:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-auth:1.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Upgrade your firebaseui version to the latest. Change compile 'com.firebaseui:firebase-ui-auth:1.0.1' to compile 'com.firebaseui:firebase-ui-auth:2.1.1'

Gradle dependencies version

Hi should i be worried about this gradle warning/error?
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.bananasandpajamas.pilloclock"
minSdkVersion 16
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(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' <---- THIS ONE
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//compile 'com.google.firebase:firebase-core:10.2.1'
//compile 'com.google.firebase:firebase-auth:10.2.1'
//compile 'com.google.android.gms:play-services-auth:10.2.1'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
}
apply plugin: 'com.google.gms.google-services'
It's giving me a warning that there are two versions of android.support:appcompat.
But when i tried to downgrade it to 25.1.1. It gives me warning that i should use the latest one.
edit:
Error message : All com.android.support libraries must use the exact
same version specification (mixing versions can lead to runtime
crashes). Found versions 25.3.1, 25.1.1. Examples include
com.android.support:animated-vector-drawable:25.3.1 and
com.android.support:cardview-v7:25.1.1
Your build version is buildToolsVersion "25.0.2"
and your dependencie version is
compile 'com.android.support:appcompat-v7:25.3.1'
How it will compile ?
Change your version in appcompat version or update your android studio..

How to gragle compile Custom Tabs when sdk is 25?

I take a reference on official website https://developer.chrome.com/multidevice/android/customtabs
They gradle like this :compile 'com.android.support:customtabs:23.3.0'
My project had used a lots of compile gradle that the sdk is 25 , i don't want to change it.
Is anyone to compile gragdle Custom Tabs when sdk is 25 ? Thanks in advance.
Here is my gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.example.my.myapp"
minSdkVersion 15
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(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.crashlytics.sdk.android:crashlytics:2.6.6#aar') {
transitive = true;
}
compile files('libs/YouTubeAndroidPlayerApi.jar')
compile 'com.android.support:appcompat-v7:25.1.1'//i don't want to change it.
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.android.support:customtabs:23.3.0'//is this with verson 25 ?
testCompile 'junit:junit:4.12'
}
apply plugin: 'io.fabric'
You should use
dependencies {
...
compile 'com.android.support:customtabs:25.1.0' //25.2.0 has been published
}
Advantages
Customizing the UI and interaction with the custom tabs.
Making the page load faster, and keeping the application alive.
Read Chrome Custom Tabs

Categories

Resources