Good I have a RadiogGroup
called rdgroup
and in four RadioButton
called rbtna
rbtnb
rbtnc
and rbtnd
respectively, what I try to do is that when you choose one of the raiobutton look in my database of firebase and show if it is correct or not
My code is as follows:
private DatabaseReference tema;
---------------------------------
tema = database.getReference("Temas").child("suma").child("1");
-----------------------------------
--califica es el onclick de mi botón siguiente
public void califica(View view) {
DatabaseReference obten=tema.child("respuesta");
if (view.getId()== Integer.parseInt(String.valueOf(obten))){
Toast.makeText(this, "Correcto", Toast.LENGTH_SHORT).show();
}
Intent i = new Intent(getApplicationContext(),restaActivity.class);
startActivity(i);
}
my bd in firebase is the following
I get the following error
Caused by: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.<init>()' is inaccessible to class 'com.google.firebase.iid.zzg' (declaration of 'com.google.firebase.iid.zzg' appears in /data/app/com.juegosludicos.vedette-1/split_lib_dependencies_apk.apk:classes17.dex)