java.lang.NoSuchMethodError: No virtual method zzbqo()Z in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp' appears in /data/app/woolamania.in.woolamania-2/base.apk) at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source) at com.google.firebase.database.FirebaseDatabase.getInstance(Unknown Source) at woolamania.in.woolamania.Home.onCreate(Home.java:32) at android.app.Activity.performCreate(Activity.java:6093)
The code of Home.java class is-
public class Home extends AppCompatActivity implements View.OnClickListener{
TextView points;
Button freeRoll,lottery;
DatabaseReference mdatabase;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Firebase.setAndroidContext(this);
mdatabase= FirebaseDatabase.getInstance().getReference("User");
Query query= mdatabase
.orderByChild("email")
.equalTo("[email protected]");
query.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
if(!dataSnapshot.exists()){
Toast.makeText(getApplicationContext(),"in first if and dsnap dont exist",Toast.LENGTH_SHORT).show();
}
for(DataSnapshot singleSnapshot: dataSnapshot.getChildren()){
if(singleSnapshot.exists()){
Toast.makeText(getApplicationContext(),"already exists",Toast.LENGTH_SHORT).show();
}
}
}
@Override
public void onCancelled(DatabaseError databaseError) {
}
});
build.gradle
file? – Michael Dodd