0

hi my android studio app keeps crashing when im sending data to firebase, the logcat gives me this error:

java.lang.RuntimeException: Found conflicting getters for name getText on class androidx.appcompat.widget.AppCompatEditText at com.google.firebase.firestore.util.CustomClassMapper$BeanMapper.(CustomClassMapper.java:629) at com.google.firebase.firestore.util.CustomClassMapper.loadOrCreateBeanMapperForClass(CustomClassMapper.java:377) at com.google.firebase.firestore.util.CustomClassMapper.serialize(CustomClassMapper.java:177) at com.google.firebase.firestore.util.CustomClassMapper.serialize(CustomClassMapper.java:140) at com.google.firebase.firestore.util.CustomClassMapper.serialize(CustomClassMapper.java:104) at com.google.firebase.firestore.util.CustomClassMapper.convertToPlainJavaTypes(CustomClassMapper.java:78) at com.google.firebase.firestore.UserDataReader.convertAndParseDocumentData(UserDataReader.java:231) at com.google.firebase.firestore.UserDataReader.parseSetData(UserDataReader.java:75) at com.google.firebase.firestore.DocumentReference.set(DocumentReference.java:167) at com.google.firebase.firestore.DocumentReference.set(DocumentReference.java:147) at com.example.finalproject3.RegisterScreen$1$1.onComplete(RegisterScreen.java:82) at com.google.android.gms.tasks.zzj.run(Unknown Source) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) 2021

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • https://github.com/orelvak/finalproject.git this is my code over here id appriciate if someone can tell me what i do wrong,thank you so much! – Orelvak Orel Nov 23 '21 at 03:16

1 Answers1

0

It looks you're trying to send an EditText control to the database. Since Firebase only supports JSON types and an EditText is not a JSON type, you get an error message that says that.

You probably want to send the value that the user entered into the EditText to the database, so have a look at: Get Value of a Edit Text field

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
  • actually i tried whats over that post right now, now it wont give me errors anymore but my app keeps on crashing when i try to submit the data – Orelvak Orel Nov 23 '21 at 03:07
  • https://github.com/orelvak/finalproject.git thats my code when i run it no errors, build is good but when i send data its crashing,what am i doing wrong? – Orelvak Orel Nov 23 '21 at 03:19
  • I'm not going to check your entire project on another site for other errors, that's simply not how Stack Overflow works. Instead I recommend reading [how to create a minimal, complete, verifiable example](http://stackoverflow.com/help/mcve), and editing your question to include such a repro. – Frank van Puffelen Nov 23 '21 at 04:44