Trying to update my firebaseui. But Why doesn't this work in my gradle file?
compile 'com.firebaseui:firebase-ui:0.4.0'
UPDATE
Still same problem.
My other dependicies ar also updated:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.google.maps:google-maps-services:0.1.12'
compile 'com.google.maps.android:android-maps-utils:0.4.3'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.firebase:firebase-simple-login:1.4.2'
compile "com.google.firebase:firebase-database:9.0.0"
compile 'com.firebaseui:firebase-ui:0.4.0'
Update:
The bug has been fixed and the new build is already pushed. Here's the last official reply from the bug post.
Ok I just pushed a fix for this. There will be some propagation delay.
If you can try it in >= 1hr and let me know if it works that
would be great. Just build your project with the gradle flag
--refresh-dependencies to make sure it re-downloads deps and does not use the cached copy.
FirebaseUI is moved to jCenter in 0.4.0, thus it can't be found in mavenCentral. If it's still giving error, try to add Database and Auth dependencies separately, like this
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebaseui:firebase-ui-auth:0.4.0'
This has been marked as a bug already here. You can read the bug post to read more about this issue.
Here's the official reply on the bug
Ok I'm glad that solved your problem. For what it's worth,
com.firebaseui:firebase-ui:0.4.0 is just an empty library that
declares dependencies on those libraries for convenience.
I will leave this issue open until I can figure out what's going on
with my jCenter configuration, thanks for the report!
For some reason 0.4.0 is not avaible through bintray or mavencentral..
0.3.1 works though, so try that for now. I will look into it later.
'com.firebaseui:firebase-ui:0.3.1'
maoke sure you are using Jcenter.
if compile 'com.firebaseui:firebase-ui-database:0.4.0' and
compile 'com.firebaseui:firebase-ui-auth:0.4.0' still not work for you, try to go to Settings-> Build,execution, Deployment -> and disable offline Work
Related
Problem: When I add the below dependencies in build.gradle, I am getting a multiDex error. I know this happens if I have unnecessary dependency but I am not able to sort it out. I am doing this for one single push notification in my app.
I added following dependencies to my build.gradle file:
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
Before this my app was working fine. All of tthe dependecies in my gradle file are listed below (including the above dependencies)
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/android-support-v4.jar')
compile files('libs/Parse-1.3.0.jar')
compile files('libs/signpost-commonshttp4-1.2.1.2.jar')
compile files('libs/signpost-core-1.2.1.2.jar')
compile files('libs/signpost-jetty6-1.2.1.2.jar')
testCompile 'junit:junit:4.12'
compile files('libs/volley.jar')
compile 'com.google.android.gms:play-services:8.1.0'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.google.android.gms:play-services-analytics:8.1.0'
compile 'com.google.android.gms:play-services-location:8.1.0'
}
Any help on how to fix this?
If your intention is just to add Gcm. you dont need those many dependencies. Especially google play services full version.
compile 'com.google.android.gms:play-services:8.1.0'
Its always good to add smaller dependencies which fits your usecase such as
compile 'com.google.android.gms:play-services-gcm:8.1.0'
If you still are still exceeding 65k limit and need multidex, you must enable in your module gradle file.
multiDexEnabled true
in your module grandle file in defaultConfig.
Along with this, its better enable proguard to keep following attributes as well to make sure you dont bloat up the apk size
minifyEnabled true
shrinkResources true
Note that enabling proguard has its own problems which you will have deal with by carefully reviewing proguard-rules.pro
if you can't solve your application's dependencies.
multi dex application supporting can be solution for that.
http://android-developers.blogspot.kr/2014/12/google-play-services-and-dex-method.html
http://developer.android.com/tools/building/multidex.html
I expected the build to take a significant amount of time but not as long as it is now. It's already past 8 hrs (9PM - 6AM) after I began but it's still not finished.
Details:
My PC is relatively powerful (built for gaming)
I extensively use external libraries, here they are:
Code:
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'org.adw.library:discrete-seekbar:1.0.0'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.android.support:cardview-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.android.support:gridlayout-v7:23.2.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.flipboard:bottomsheet-core:1.5.0'
compile 'com.flipboard:bottomsheet-commons:1.5.0'
compile 'com.guerwan:transitionbackport:1.1'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0#aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.ogaclejapan.smarttablayout:library:1.6.0#aar'
compile 'com.github.traex.rippleeffect:library:1.3'
compile 'asia.ivity.android:drag-sort-listview:1.0'
compile 'org.adw.library:discrete-seekbar:1.0.0'
compile 'com.liulishuo.filedownloader:library:0.1.9'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.github.castorflex.smoothprogressbar:library:1.0.1-SNAPSHOT#aar'
compile 'org.jetbrains:annotations-java5:15.0'
QUESTION:
Why is that the case? Is there anyway to minimize it? Or is it even normal not a bug? Thanks.
I've had this happen a few times in the past, especially when on a flaky internet connection. Here's what I would try:
Force close Android Studio and re-launch.
Enabled Gradle Offline Work (assuming you have cached versions of your dependencies) by going to File->Settings->Build,Execution,Deployment->Build Tools->Gradle and then check "Offline Work"
Generate your .apk
If you still are having problems building after that, I would try File->Invalidate Caches and Restart. Do you also have this issue when generating .apks with with ProGuard disabled?
I searched for ages to determine why my google endpoints module was causing a UNEXPECTED_.._EXCEPTION when I tried to run the App on a emulator.
Research indicated that a library is being called more than once. But I could find no clear error with regard to this:
My app build.gradle:
compile project(path: ':kk_endpoint', configuration: 'android-endpoints')
compile'com.android.support:appcompat-v7:22.2.0'
compile 'com.google.android.gms:play-services:7.5.0'
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.squareup.picasso:picasso:2.3.2'
And my Google endpoint module build.gradle:
appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.19'
compile 'com.google.appengine:appengine-endpoints:1.9.19'
compile 'com.google.appengine:appengine-endpoints-deps:1.9.19'
compile 'javax.servlet:servlet-api:2.5'
compile 'com.googlecode.objectify:objectify:5.1.1'
compile 'com.ganyo:gcm-server:1.0.2'
Clearly nothing is being called twice on face level. What could be the cause of this problem?
After hours of research I found that the problem was coming from the guava lib, and all I needed to do was exclude that lib:
compile (project(path: ':kk_endpoint', configuration: 'android-endpoints')) {
exclude(module: 'guava-jdk5')
}
Please note brackets need to be exactly as above or won't work.
compile project(path: ':kk_endpoint', configuration: 'android-endpoints'){
exclude(module: 'guava-jdk5')}
Doesn't work.
I hope this helps someone save hours
I have used following dependency in my Android Studio gradle.
dependencies {
compile project(':facebookSDK')
compile project(':wheel')
compile project(':viewPagerLibrary')
compile 'com.google.code.gson:gson:2.1'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:20.0.0'
compile 'io.card:android-sdk:5.0.0'
compile files('libs/acra-4.5.0.jar')
compile files('libs/analytics-3.4.0.jar')
compile files('libs/androidasync-1.3.8.jar')
compile files('libs/crashlytics.jar')
compile files('libs/CWAC-Adapter.jar')
compile files('libs/eventbus-2.2.0.jar')
compile files('libs/fastjson-1.1.6.jar')
compile files('libs/gradle-wrapper.jar')
compile files('libs/ion-1.3.8.jar')
compile files('libs/localytics.jar')
compile files('libs/nineoldandroids.jar')
compile files('libs/parse-1.3.0.jar')
compile files('libs/socialauth-4.4.jar')
compile files('libs/universal-image-loader-1.9.0.jar')
}
Now I need to implement Braintree Gradle dependency
compile 'com.braintreepayments.api:braintree:1.+'
But sometimes it show me some other error sometime its shows me java.exe finished with non-zero exit value 3.
I want to use this braintree dependency for payment options please help me out how can i use it without error with the current dependency.
Thanks a lot for solving my problem in advance.
The Braintree Android library depends on GSON version 2.2.4 or higher.. It looks like you're currently depending on version 2.1.0. Upgrading your dependency to 2.2.+ should satisfy Braintree's and allow installation.
If you do run into further problems, Braintree's support can help, via email at support#braintreepayments.com or phone at 877.434.2894.
I am having trouble using Gradle to build Facebook SDK 4.0.1 in Android Studio 1.2 beta. There is no compile error, but the compiled library is not in my External Libraries. Previously, I successfully had:
compile 'com.facebook.android:facebook-android-sdk:3.22.0'
However,
compile 'com.facebook.android:facebook-android-sdk:4.0.1'
doesn't appear to do anything. From searching, it looks like this version is available on maven. Here is my complete dependency list:
dependencies {
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.parse.bolts:bolts-android:1.2.0'
compile 'com.mixpanel.android:mixpanel-android:4.5.3#aar'
compile 'net.hockeyapp.android:HockeySDK:3.5.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.gms:play-services:6.5.87'
//compile 'com.google.android.gms:play-services:7.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile project(':libraries:downloader_library')
compile project(':libraries:zip_file')
compile 'com.facebook.android:facebook-android-sdk:4.0.1'
testCompile 'junit:junit:4.12'
}
I also have had some difficulties with Google Play Services 7.0.0, hence the comment.
Is there something I am doing wrong, such as a missing dependency or an incorrect assumption?
Solved
It turns out you can't have comments in your dependencies, so removing
//compile 'com.google.android.gms:play-services:7.0.0'
Fixed the issue.