java.lang.AbstractMethodError: com.firebase.client.RunLoop

207 views
Skip to first unread message

David Mikesell

unread,
May 29, 2015, 9:43:16 AM5/29/15
to fireba...@googlegroups.com
I'm sure I'm doing something trivially stupid, but I'm stuck and would appreciate some help.  I maintain a Firebase reference in my Application class.  To initialize the reference, I call first Firebase.setAndroidContext(getInstance()).  Then I call ref = new Firebase(firebaseUrl).  The call to the Firebase constructor throws the AbstractMethodError.  The stack trace is:  

    java.lang.AbstractMethodError: abstract method "com.firebase.client.RunLoop com.firebase.client.core.Platform.newRunLoop(com.firebase.client.core.Context)"
            at com.firebase.client.core.Context.ensureRunLoop(Context.java:219)
            at com.firebase.client.core.Context.initServices(Context.java:106)
            at com.firebase.client.core.Context.freeze(Context.java:87)
            at com.firebase.client.core.RepoManager.getLocalRepo(RepoManager.java:55)
            at com.firebase.client.core.RepoManager.getRepo(RepoManager.java:19)
            at com.firebase.client.Firebase.<init>(Firebase.java:182)
            at com.firebase.client.Firebase.<init>(Firebase.java:187)
            at com.firebase.client.Firebase.<init>(Firebase.java:165)
            at com.unuz.firebasetest.FirebaseTestApplication.getFirebase(FirebaseTestApplication.java:46)
            at com.unuz.firebasetest.MainActivity.onCreate(MainActivity.java:17)
            at android.app.Activity.performCreate(Activity.java:6221)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2614)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
            at android.app.ActivityThread.access$900(ActivityThread.java:172)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1421)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:145)
            at android.app.ActivityThread.main(ActivityThread.java:5835)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1388)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1183)

My android studio test app that demonstrates the issue is available here:  https://www.dropbox.com/s/9sgr8dlelrcql03/FirebaseTest.zip?dl=0

Thanks in advance,
Dave

Jonny Dimond

unread,
May 29, 2015, 11:46:52 AM5/29/15
to fireba...@googlegroups.com
Hi Dave,

the issue arrises when you include GeoFire, because GeoFire has an explicit dependency to firebase-client-jvm (our Android-independent code) in a different version than you included. We will work on fixing this. In the mean time you can get around this by including a dependency in the right version:

compile 'com.firebase:firebase-client-android:2.2.4'
compile 'com.firebase:firebase-client-jvm:2.2.4'

Make sure to have both dependencies and keep the versions in lockstep.

Jonny

David Mikesell

unread,
May 29, 2015, 1:46:49 PM5/29/15
to fireba...@googlegroups.com
Awesome, thanks for the help Jonny.  Modifying my gradle dependencies as follows got me going:

compile 'com.firebase:firebase-client-android:2.2.4'
compile 'com.firebase:firebase-client-jvm:2.2.4'
compile ('com.firebase:geofire:1.1.0')  {
exclude module: 'firebase-client-android'
exclude module: 'firebase-client-jvm'
}

-Dave

Jonny Dimond

unread,
May 29, 2015, 1:49:15 PM5/29/15
to fireba...@googlegroups.com
FYI - we have a PR open for this issue: https://github.com/firebase/geofire-java/pull/9 which effectively does the same as the exclude module directive you have in your gradle file.
Reply all
Reply to author
Forward
0 new messages