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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With