Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot resolve firebase

I got this code from udacity while doing firebase course but there is an error in the import statement.

 import com.firebase.client.Firebase;

 public class ShoppingListApplication extends android.app.Application {                   

 @Override
    public void onCreate() {
        super.onCreate();
        Firebase.setAndroidContext(this);
    }

It shows Cannot resolve firebase.

like image 526
Pritesh Avatar asked Mar 12 '23 09:03

Pritesh


1 Answers

You have not added

compile 'com.firebase:firebase-client-android:2.5.2'

in your dependencies.

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:24.1.1'
    compile 'com.google.firebase:firebase-core:9.2.0'
    compile 'com.firebase:firebase-client-android:2.5.2'
    testCompile 'junit:junit:4.12'

}

After adding it.. just sync project once.

like image 168
Amit Upadhyay Avatar answered Mar 25 '23 10:03

Amit Upadhyay