Firebase: Problem with adding compilation 'com.google.firebase: firebase-server-sdk: [3.0.0,)' dependencies

advertisements

My app is working okey byt when I add compile 'com.google.firebase:firebase-server-sdk:[3.0.0,)' to add firebase custom outh

The error works in this code,

public void onCreate(){
        super.onCreate();
        if (!FirebaseApp.getApps(this).isEmpty()) {
            FirebaseDatabase.getInstance().setPersistenceEnabled(true);
        }

        }
}
Error:(23, 25) error: method getApps in class FirebaseApp cannot be applied to given types;
required: no arguments
found: Application
reason: actual and formal argument lists differ in length............,

and also this warning.

org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages


You are importing the firebase server SDK. You need to import the Android version.

Follow the Android tutorial at https://www.firebase.com/docs/android/quickstart.html