1

I am trying to send data using firebase, but it says that DynamiteModule: Local module descriptor class for com.google.firebase.auth not found. Here's my code. I checked but my problem doesn't resemble any other problems.

 protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Firebase.setAndroidContext(this);
    setContentView(R.layout.activity_main);
    Toast.makeText(this, "heee", Toast.LENGTH_SHORT).show();

    firebaseAuth = FirebaseAuth.getInstance();

    buttonSave = (Button) findViewById(R.id.button);
    editTextName = (EditText) findViewById(R.id.editTextName);
    //editTextAddress = (EditText) findViewById(R.id.editTextAddress);

    textViewPersons = (TextView) findViewById(R.id.textViewPersons);

    firebaseAuth.getCurrentUser();


    buttonSave.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            //Creating firebase object
            Firebase ref = new Firebase(Config.FIREBASE_URL);

            //Getting values to store
            String name = editTextName.getText().toString().trim();
           // String address = editTextAddress.getText().toString().trim();

            //Creating Person object
            Person person = new Person();

            //Adding values
            person.setName(name);
            //person.setAddress(address);

            //Storing values to firebase
            ref.child("Person").setValue(person);
        }
    });
}

I am stuck, please help!!

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
DonJon
  • 95
  • 1
  • 1
  • 5

2 Answers2

1

Check "rules" in your firebase's console and then in database. And change it to this: {

"rules": {

".read": true,

".write":true

}

} It should solve the problem.

Prateek Paliwal
  • 323
  • 1
  • 10
0

Check your Google Play Services version - it will most likely be lower than the requirements (this recently caught me out when switching to the new API).

See also: Android Firebase DynamiteModule: Failed to load module descriptor

Community
  • 1
  • 1
JamieB
  • 923
  • 9
  • 30