I have been developing apps using firebase for over an year now. Today when I open Android Studio suddenly all my projects built on Firebase are throwing the following error:
Error:Could not find firebase-auth-license.aar (com.google.firebase:firebase-auth-license:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-auth-license/12.0.1/firebase-auth-license-12.0.1.aar
Tried fixing it with many things like updating sdk build tools, google play services etc but still getting same error.
Following is my gradle file:
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "**********",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
applicationId "*****"
minSdkVersion 19
targetSdkVersion 26
resConfig("en")
versionCode 11
versionName "2.21"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// testCompile 'junit:junit:4.12'
// compile 'com.google.firebase:firebase-ads:9.4.0'
// Single target that includes all FirebaseUI libraries
// releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
compile project(':checkbox')
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support:support-vector-drawable:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:animated-vector-drawable:26.+'
compile 'com.android.support:customtabs:26.+'
compile 'com.android.support:cardview-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.firebaseui:firebase-ui:0.4.4'
compile 'com.squareup.leakcanary:leakcanary-android:1.5'
compile 'com.google.android.gms:play-services-base:10.0.1'
compile 'com.github.hotchemi:android-rate:1.0.1'
compile 'com.master.android:permissionhelper:1.3'
compile 'com.stone.vega.library:VegaLayoutManager:1.0.2'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'
}
apply plugin: 'com.google.gms.google-services'
To solve this, please change the following lines of code:
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1
compile 'com.google.android.gms:play-services-base:10.0.1'
compile 'com.google.android.gms:play-services-ads:10.0.1'
compile 'com.firebaseui:firebase-ui:0.4.4'
to
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-database:16.0.4
implementation 'com.google.android.gms:play-services-base:16.0.1'
implementation 'com.google.android.gms:play-services-ads:16.0.0'
implementation 'com.firebaseui:firebase-ui-database:4.2.1'
In your top level build.gradle file please be sure to have the latest version of Google Service plugin:
classpath 'com.google.gms:google-services:4.1.0'
The culprit was compile 'com.onesignal:OneSignal:[3.7.1, 3.99.99]'.
I just replaced it with compile 'com.onesignal:OneSignal:[3.9.1, 3.99.99]' and now everything is fine.
Related
i have the following error:
Build gradle file is following:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.bln.smc"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.firebase:firebase-database:11.6.0'
compile 'com.google.firebase:firebase-storage:11.6.0'
compile 'com.google.firebase:firebase-crash:11.6.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-messaging:11.6.0'
compile 'com.android.support:design:23.0.3'
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:recyclerview-v7:23.0.1'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
I researched a little bit and i think that the settings in the gradle file are ok.
So how can i solve this problem?
This is because you have conflicted dependencies in your build.gradle. Firebase UI need version 25 of support library but your dependencies is giving it version 23 instead.
If you want to use firebase-ui:1.2.0, you at least need to use support library version 25.1.1. Take a look at firebase-ui 1.2.0 build.gradle.
Then, you also need to use a compatible Firebase/Google Play Service version. For firebase-ui:1.2.0 you need to use Firebase/Google Play service version 10.2.0.
My suggestion is to use the latest configuration. Something like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.bln.smc"
minSdkVersion 18
targetSdkVersion 26
...
}
...
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:recyclerview-v7:26.1.0'
// This is needed for firebase UI
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:customtabs:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-storage:11.4.2'
compile 'com.google.firebase:firebase-crash:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.firebaseui:firebase-ui:3.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
}
// Add to the bottom of the file
apply plugin: 'com.google.gms.google-services'
I am working on a watch app which also has a handheld app. Requirement is that watch app should install automatically onto watch once app is installed on the phone. But unfortunately, I am not able to get that done.
I know I need to do a release APK. I have been trying to do same but still not able to get it done. I also uploaded app on google play store to see if that can help me but still no luck can anyone let me know what I am doing wrong. Have been stuck on this for last few weeks any kind of help will be really appreciated.
Here is my Phone app gradle
compileSdkVersion 25
buildToolsVersion "25.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
// office id
applicationId "appid"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
versionCode 8
versionName "1.0.7"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':ImageGrid')
wearApp project(':wear')
compile 'com.google.android.gms:play-services-wearable:10.0.1'
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:cardview-v7:25.3.1'
compile 'com.tf.library.tabs:tftabs:2.1.0'
compile 'com.soundcloud.android:android-crop:1.0.1#aar'
compile 'com.shaishavgandhi:login-buttons:0.1.1'
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'it.sephiroth.android.library.picasso:picasso:2.5.2.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:gridlayout-v7:25.3.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services-location:10.0.1'
//CHAT UI
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'me.himanshusoni.chatmessageview:chat-message-view:1.0.3'
// AUTH
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.0'
//DATABASE FIREBASE,UI
compile 'com.google.firebase:firebase-database:10.0.0'
compile 'com.firebaseui:firebase-ui-database:1.0.1'
//STORAGE FIREBASE
compile 'com.google.firebase:firebase-storage:10.0.0'
//Places SERVICES
compile 'com.google.android.gms:play-services-places:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.0'
compile 'com.google.firebase:firebase-crash:10.0.0'
compile 'com.android.support:multidex:1.0.0'
// compile 'com.google.android.gms:play-services-maps:9.6.1'
// compile 'com.google.android.gms:play-services:8.4.0'
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.victor:lib:1.0.1'
compile 'com.github.myinnos:AwesomeImagePicker:1.0.1'
compile 'com.adityak:browsemyfiles:1.4'
compile 'id.zelory:compressor:1.0.4'
compile files('libs/aspectjrt-1.7.3.jar')
compile files('libs/isoparser-1.0.6.jar')
}
And this is my wear app gradle file
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "appid"
minSdkVersion 18
targetSdkVersion 22
versionCode 7
versionName "1.0.6"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v13:25.3.1'
provided 'com.google.android.wearable:wearable:2.0.3'
compile 'com.google.android.support:wearable:2.0.3'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.google.android.gms:play-services-wearable:10.0.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
}
Just to make sure it work I have package name for both app and wearable same
Please help me on this.
Thank you
As stated in this thread, try to check your permissions. The Smartphone part needs to have all the permissions the Wear component has.
You may also check this post for reference.
...in build.gradle file of your phone app, you should mention the exact name of the wear app folder. If you created the project in Android Studio, then your build.gradle should look like this:
wearApp project(':wear')
This can happen because of the following reasons:
Wear & Mobile app's "permissions" are not same.
Package name of Wear & Mobile apps are not matching.
Application ID (build.gradle file) of Mobile & wear app are not matching.
Asset Compression
Hope this helps!
Like the title I want to use both firebase and google map.
When I try it individually, it doesn't have any errors. But If I try to use it all ERROR!! Can anyone help me fix this problem? I've tried to find some soulutions but multidex or making the update level same doesn't work at ALL.
Here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "MY-APPLICATION-ID"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
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.2'
compile 'com.github.paolorotolo:appintro:4.0.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-database:10.2.0'
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-maps:11.0.4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
And here is my gradle error.. :(
Error:Execution failed for task ':app:processDebugGoogleServices'.
> 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 10.2.0.
Lower the version to same as Firebase dependencies or vice versa
compile 'com.google.android.gms:play-services-maps:10.2.0'
or
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
Make sure you have same version of both
firebase and google map
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.android.gms:play-services-maps:11.0.4'
Try to use the same version for Firebase as for google
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.paolorotolo:appintro:4.0.0'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.android.support:design:25.3.1'
compile 'com.google.android.gms:play-services-maps:11.0.4'
testCompile 'junit:junit:4.12'
Use latest versions of firebase and maps for Example. 11.0.4
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
and make sure you in project's gradle file you are using
classpath 'com.google.gms:google-services:3.1.0'
I am currently having some trouble running my project.
duplicate entry: com/google/android/gms/internal/zzai$zza.class
The error is saying that I have a duplicate dependency, but I can't see a duplicate anywhere!
The error appears on this line of code:
compile 'com.google.android.gms:play-services-ads:8.4.0'
It says that it has found versions 9.8 and 8.4. I only see version 8.4 though.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.tedrasoft.templategoogle"
minSdkVersion 15
targetSdkVersion 23
versionCode=7
versionName="1.6"
multiDexEnabled true
manifestPlaceholders = [manifestApplicationId : "${applicationId}",
onesignal_app_id : "ed282ffa-1e9e-4dd8-9edc-cfdcbe8376bd",
onesignal_google_project_number: "3902815545"]
}
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/chartboost.jar')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.facebook.android:audience-network-sdk:4.+'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.google.android.gms:play-services-location:+'
compile files('libs/jackson-annotations-2.1.0.jar')
compile files('libs/jackson-core-2.1.0.jar')
compile files('libs/jackson-databind-2.1.0.jar')
}
In my case, it's because of the
compile 'com.facebook.android:audience-network-sdk:4.+'
I change it to this:
compile ('com.facebook.android:audience-network-sdk:4.+'){
exclude group:"com.google.android.gms"
}
No more problem!
Make these versions match... so 8.4.0, not + which pulls the latest 9.8 I think, now?
compile 'com.google.android.gms:play-services-analytics:+'
compile 'com.google.android.gms:play-services-location:+'
Also, these are 1) unneccessary lines (because of compile fileTree), and 2) you should make them like the others and not use jar files.
compile files('libs/jackson-annotations-2.1.0.jar')
compile files('libs/jackson-core-2.1.0.jar')
compile files('libs/jackson-databind-2.1.0.jar')
Upgrade google play services (maps, location and gcm) from 9.0.0 to 9.2.0
compile 'com.google.android.gms:play-services-location:9.2.0'
compile 'com.google.android.gms:play-services-maps:9.2.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
Then add this dependency:
compile 'com.google.android.gms:play-services-places:9.2.0'
I am new to Android-studio and Firebase.
I am trying to add Firebase UI dependency to my android project and ultimately plan to use FireBase facebook authentication UI.
But I get this message every time I try to sync.
Failed to resolve com.firebaseui:firebase-ui:0.5.3
I checked this link to see the versions but everything looked fine.
This is how my build.gradle looks like:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.rohintak.firebasepractice"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
// FirebaseUI Database only
//compile 'com.firebaseui:firebase-ui-database:0.5.3'
// FirebaseUI Auth only
//compile 'com.firebaseui:firebase-ui-auth:0.5.3'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.google.firebase:firebase-auth:9.4.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-database:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.firebaseui:firebase-ui:0.5.3'
compile 'com.firebase:firebase-client-android:2.3.1'
}
apply plugin: 'com.google.gms.google-services'
You're including different versions of the Firebase SDK and FirebaseUI. That won't work.
Cleaned up dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.google.firebase:firebase-auth:9.4.0'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-database:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.firebaseui:firebase-ui-auth:0.5.3'
}