I set up chat on firebase and it worked. But when i'm adding the map, chat stopped work.
When i'm trying open chat in the app i get the error
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoSuchMethodError: com.google.firebase.FirebaseApp.zzUV
my dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.google.android.gms:play-services-maps:10.2.1'
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
}
allprojects {
repositories {
// ...
maven { url 'https://maven.fabric.io/public' }
}
}
Add this in your build.gradle file and Rebuild project.
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'com.google.firebase:firebase-core:10.2.1'
Related
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.android.gms:play-services-ads:9.4.0'
testCompile 'junit:junit:4.12'
}
in above code, i have given my apps dependencies. i want to know whether dependencies
I would like to create a exported jar file in Android studio,
but the problem here, the dependencies of gson , rxjava and retrofit did not include from the jar file, when i imported to other project
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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'
// API CONNECTION
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.google.code.gson:gson:2.6.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.3.1'
compile 'io.reactivex.rxjava2:rxjava:2.0.2'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'com.jakewharton.retrofit:retrofit2-rxjava2-adapter:1.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'junit:junit:4.12'
}
task deleteJar(type: Delete) {
delete 'libs/logmanagementlib.jar'
}
task createJar(type: Copy) {
from('build/intermediates/bundles/release/')
into('libs/jars/')
include('classes.jar')
rename('classes.jar', 'logmanagementlib.jar')
}
createJar.dependsOn(deleteJar, build)
can you give me a example how to include the compile 'com.google.code.gson:gson:2.6.1?
i have tried all solutions like placing all gms gradles version same and enabling multiDex, minifyEnable but getting same error again and again. please do help me im fedup all of this.
09-23 21:49:23.889 996-996/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.haroon.maslapk, PID: 996
java.lang.NoSuchMethodError: No static method zzb(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; in class Lcom/google/android/gms/common/internal/zzac; or its super classes (declaration of 'com.google.android.gms.common.internal.zzac' appears in /data/app/com.example.haroon.maslapk-2/split_lib_dependencies_apk.apk:classes15.dex)
at com.google.firebase.provider.FirebaseInitProvider.zza(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:6326)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5918)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5857)
at android.app.ActivityThread.-wrap3(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1699)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
This is my gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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-alpha7'
compile 'com.android.support:design:25.3.1'
compile 'me.anwarshahriar:calligrapher:1.0'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.kofigyan.stateprogressbar:stateprogressbar:0.0.6'
compile 'com.google.firebase:firebase-messaging:10.2.0'
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.google.android.gms:play-services-auth:10.2.0'
testCompile 'junit:junit:4.12'}
I think you are missing
}
apply plugin: 'com.google.gms.google-services'
in the app build.gradle just under all dependencies written.
And remove this:
compile 'com.google.android.gms:play-services-auth:10.2.0'
In your build.gradle of android add followings:
allprojects {
repositories {
jcenter()
maven{
url "https://maven.google.com" }
com.facebook.android:account-kit-sdk:4.26.0 appears to have dependencies on version 11.0.1 of some Google Play services libraries. All versions of Firebase and Google Play services libraries in your build must be the same. These changes should help:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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-alpha7' //1.0.2 is available
compile 'com.android.support:design:25.3.1'
compile 'me.anwarshahriar:calligrapher:1.0'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.kofigyan.stateprogressbar:stateprogressbar:0.0.6'
compile 'com.google.firebase:firebase-messaging:11.0.1' // CHANGED
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.google.android.gms:play-services-auth:11.0.1' // CHANGED
testCompile 'junit:junit:4.12'}
I keep getting errors when I try to sync my gradle. It has something to do with the SDK version. I would like to know which firebase dependcies fit to 25.3.1
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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.google.firebase:firebase-messaging:10.2.1'
//compile 'com.firebase:firebase-jobdispatcher:1.0.2'
//compile 'com.firebaseui:firebase-ui:0.5.2'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
compile 'com.firebaseui:firebase-ui-storage:1.2.0'
compile 'com.firebaseui:firebase-ui:1.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should use 10.2.1 and 1.2.0 version .
compile 'com.google.firebase:firebase-auth:10.2.1'
compile 'com.google.firebase:firebase-messaging:10.2.1'
Clean-Rebuild and Run .
// Getting a "Could not find" error? Make sure you have
// the
latest Google Repository in the Android SDK manager
Here is what my build.gradle file looks like
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile group: 'com.google.guava', name: 'guava', version: '18.0'
compile 'com.google.android.gms:play-services:9.6.1'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
testCompile 'junit:junit:4.12'
}
Can anyone figure out why it will not import com.google.android.collect.Lists?
Guava does not have a class named com.google.android.collect.Lists. The class is com.google.common.collect.Lists.