I'm using Android Studio 2.3. In my app level build gradle, I have these dependencies.
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:10.2.4'
compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'com.google.android.gms:play-services-auth:10.2.4'
testCompile 'junit:junit:4.12'
Not all the time, but some times when I run my app after few modifications in my source code (Activities basically). It rearranges the order as shown below and gives me a build error in LogCat. why ?
compile
'com.android.support:appcompat-v7:25.3.1'compile
'com.android.support:design:25.3.1'compile
'com.github.bumptech.glide:glide:3.6.1'compile
'com.android.support.constraint:constraint-layout:1.0.2'compile
'com.google.firebase:firebase-core:10.2.4'compile 'com.google.firebase:firebase-database:10.2.4'
compile 'com.google.firebase:firebase-storage:10.2.4'
compile 'com.google.firebase:firebase-auth:10.2.4'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.google.firebase:firebase-messaging:10.2.4'
compile 'com.google.android.gms:play-services-auth:10.2.4'
testCompile 'junit:junit:4.12'
have you tried using the
compile('com.frebase..')
instead?
Related
How to reduce apk size when releasing signed apk from my app module,
I tried
In my Gradle file I have added these dependencies
compile project(':v-plus')
compile project(':android-pdf-viewer')
compile 'com.android.support:support-v4:27.0.1'
compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:recyclerview-v7:27.0.1'
compile 'com.android.support:cardview-v7:27.0.1'
compile 'com.android.support:customtabs:27.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-analytics:11.4.2'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.google.android.gms:play-services-auth:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.facebook.network.connectionclass:connectionclass:1.0.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'me.relex:circleindicator:1.2.2#aar'
compile 'com.firebase:firebase-jobdispatcher:0.8.4'
compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.61'
By using above and after creating release apk, the size became 28 MB, how can I fix that.
When I update my play-services-location to 11.0.2 I get following error.
package com.google.android.gms.maps does not exist
package com.google.android.gms.maps.model does not exist
When play-services-location was 9.0.1 it works fine. I need to integrate this app into another app where dependencies are :
compile 'com.google.firebase:firebase-appindexing:11.0.2'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.android.gms:play-services-auth:11.0.2'
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'com.google.firebase:firebase-storage:11.0.2'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:24.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
testCompile 'junit:junit:4.12'
When I tried to set all to 9.0.1, I get following error:
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.google.firebase:firebase-database:9.0.1'
compile 'com.google.firebase:firebase-storage:9.0.1'
compile 'com.firebaseui:firebase-ui:2.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-auth:9.0.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:design:24.1.1'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.google.android.gms:play-services-location:9.0.1'
compile 'com.google.android.gms:play-services-auth:9.0.1'
compile 'com.google.firebase:firebase-appindexing:9.0.1'
Error:Failed to resolve com.google.firebase:firebase-appindexing:9.0.1
Do I need to update Google play services. Please help.
I don't see
compile 'com.google.android.gms:play-services-maps:11.0.2'
By the way, latest version is 11.4.2
My project seems fine, but still does not work. Am I supposed to use highest version of dependencies? Is that it? For example firebase-auth:11.2.2 instead of 10.0.1 which I used?
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.android.support:support-v4:25.1.0'
compile 'com.android.support:design:25.1.0'
testCompile 'junit:junit:4.12'
Your problem is that you are mixing the old dependencies with the new once. So in order to solve your problem, you need to remove all the dependencies that are old and use the latest version of the new once.
Remove this lines of code:
compile 'com.firebaseui:firebase-ui-storage:1.1.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
and add only this lines:
compile 'com.google.firebase:firebase-auth:11.2.2'
compile 'com.google.firebase:firebase-database:11.2.2'
compile 'com.google.firebase:firebase-storage:11.2.2'
compile 'com.google.android.gms:play-services-auth:11.2.2'
I tried to link my app with gplus it works fine in separate and not when I merged it with my project app. Please take a look at the below gradle file and help me if u can.
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.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-jackson:2.1.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support:multidex:1.0.1'
}
It shows the following error when i try to run:
java.lang.AbstractMethodError: abstract method "com.google.android.gms.common.api.Api$zze com.google.android.gms.common.api.Api$zza.zza(android.content.Context, android.os.Looper, com.google.android.gms.common.internal.zzf, java.lang.Object, com.google.android.gms.common.api.GoogleApiClient$ConnectionCallbacks, com.google.android.gms.common.api.GoogleApiClient$OnConnectionFailedListener)"
I was facing the same issue,
I tried with changing 'com.google.android.gms:play-services-auth:9.0.2' and 'com.google.android.gms:play-services:9.0.2' to
'com.google.android.gms:play-services-auth:9.2.0'
'com.google.android.gms:play-services:9.2.0'
Try to change the version.
I'm using multi library which they are installed by Gradle on my appliaction, after opening application each time i get simple delay on opening application such as 10 second :| if i download libraries instead of using and installing by Gradle, that cause of speed up my application or not?
My Gradle
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
compile 'com.jakewharton.rxbinding:rxbinding-design:0.4.0'
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'frankiesardo:icepick:3.2.0'
provided 'frankiesardo:icepick-processor:3.2.0'
compile('io.socket:socket.io-client:0.7.0') {
exclude group: "org.json", module: "json"
}
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.github.devlight.navigationtabbar:library:+'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.2.2'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.github.chyrta:AndroidOnboarder:+'
compile 'com.github.lamydev:android-notification:3.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.bugsnag:bugsnag-android:+'
compile 'com.github.liuguangqiang.swipeback:library:1.0.2#aar'
compile 'com.wunderlist:sliding-layer:1.2.5'
compile 'com.facebook.rebound:rebound:0.3.8'
compile 'com.tumblr:backboard:0.1.0'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jaredrummler:android-device-names:1.0.9'
compile 'org.sufficientlysecure:html-textview:1.6'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.github.ksoichiro:android-observablescrollview:1.5.2'
compile 'com.kogitune:pre-lollipop-activity-transition:1.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.alexvasilkov:foldable-layout:1.2.0'
compile 'com.mikhaellopez:circularfillableloaders:1.2.0'
compile 'cat.ereza:customactivityoncrash:1.5.0'
compile 'jp.wasabeef:glide-transformations:2.0.1'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3'
compile 'com.github.goka.flickableview:flickableview:1.0.0'
compile 'com.github.Kennyc1012:BottomSheet:2.1.2'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile('com.github.ozodrukh:CircularReveal:2.0.1#aar') {
transitive = true;
}
compile project(':lib-searchview')
}
No because gradle saves them locally, you can go to your gradle.properties and set these values and enable the gradle to use more of your machine compute power.
-Xms4096m
-Xmx4096m
-XX:MaxPermSize=2048m
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+HeapDumpOnOutOfMemoryError
-Dfile.encoding=utf-8