I am trying to start a Java client from scratch, and have pulled in firebase-client-jvm:2.2.1
in gradle. I get the following in a stack trace while trying to compile anything that includes the com.firebase.client.Firebase
class:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: Unable to load class com.firebase.client.Firebase due to missing dependency android/content/Context
at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1083)
...
Caused by: java.lang.NoClassDefFoundError: Unable to load class com.firebase.client.Firebase due to missing dependency android/content/Context
I have no desire to include anything to do with Android, and all of the answers I find state that firebase "supports both" (i.e. Get Firebase to work with java, not Android), but I do not know how to get going.
I cannot find examples or tutorials online showing a "simple" Java-only client, and would appreciate any "getting started" help.
UPDATE: Not only did I have to create the android.context.Context
class, I had to give up on writing the program in Groovy. When I switched it back to a Java project it seemed to smooth things out considerably.