0

I have a trouble in Firebase and package Location

com.google.firebase.database.DatabaseException: Class android.location.Location does not define a no-argument constructor. If you are using ProGuard, make sure these constructors are not stripped.

private void readChanges() {
    reference.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            if(dataSnapshot.exists()){
                Location location = dataSnapshot.getValue(Location.class);
            }
        }

        @Override
        public void onCancelled(@NonNull DatabaseError databaseError) {

        }
    });
}

And i have error : Process: com.example.coffeebakeryfordriver, PID: 15287 com.google.firebase.database.DatabaseException: Class android.location.Location does not define a no-argument constructor. If you are using ProGuard, make sure these constructors are not stripped.

0 Answers0