 commit.

 Q:

Can not read data from firebase as List in android

I read many articles but still my problem is continuing, while fetching data from firebase as list. could you please help me on this.

Error:  com.google.firebase.database.DatabaseException: Can't convert
  object of type java.lang.String to type SubCategoryLoad Object

Firebase database image

--> Loading data from firebase:
mSubCategoryDatabaseRef = FirebaseDatabase.getInstance().getReference("user_post_add_database_ref").child("yeswanth599").child(mCategoryNameReceive);

    mSubCategoryDatabaseRef.addValueEventListener(new ValueEventListener() {
        @Override
        public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
            for (DataSnapshot postSnapshot : dataSnapshot.getChildren()) {
                GenericTypeIndicator<Map<String,SubCategoryLoad>> genericTypeIndicator=new GenericTypeIndicator<Map<String,SubCategoryLoad>>(){};
            (-->Error Showing in this Line)   Map<String,SubCategoryLoad> map=(Map<String, SubCategoryLoad>)postSnapshot.getValue(genericTypeIndicator);
                assert map!= null;
                mSubCategoryLoad=new ArrayList<>(map.values());

            }

            mSubCategoryAdapter = new SubCategoryDisplayAdapter(getContext(), mSubCategoryLoad);

            mSubCategoryRecyclerView.setAdapter(mSubCategoryAdapter);
            mSubCategoryProgressCircle.setVisibility(View.INVISIBLE);
        }

        @Override
        public void onCancelled(@NonNull DatabaseError databaseError) {
            Toast.makeText(getContext(), databaseError.getMessage(), Toast.LENGTH_SHORT).show();
            mSubCategoryProgressCircle.setVisibility(View.INVISIBLE);
        }
    });

--> SubCategoryLoad.Class 
public class SubCategoryLoad {
private String mUserPostAddress;

private String mUserPostBusinessEndTime;

private String mUserPostBusinessSelectedCity;

private String mUserPostBusinessSelectedCountry;

private String mUserPostBusinessStartTime;

private String mUserPostCategory;

private String mUserPostEmail;

private
commit. 

  Q: 

 Can not read data from firebase as List in android 

 I read many article but however my problem is continuing, while fetching datum from firebase as list. could you please help me on this. 

 Error:   com.google.firebase.database. DatabaseException: Can't change 
   object of type java.lang. bowed stringed instrument to type SubCategoryLoad Object 

 Firebase database image 

 -- > Loading datum from firebase: 
 mSubCategoryDatabaseRef = FirebaseDatabase.getInstance().getReference("user_post_add_database_ref").child("yeswanth599").child(mCategoryNameReceive); 

     mSubCategoryDatabaseRef.addValueEventListener(new ValueEventListener () { 
         @Override 
         public void onDataChange(@NonNull DataSnapshot dataSnapshot) { 
             for (DataSnapshot postSnapshot: dataSnapshot.getChildren ()) { 
                 GenericTypeIndicator < Map < String, SubCategoryLoad > > genericTypeIndicator = new GenericTypeIndicator < Map < String, SubCategoryLoad > > () { }; 
             (-->Error Showing in this Line)    Map < String, SubCategoryLoad > map=(Map < String, SubCategoryLoad>)postSnapshot.getValue(genericTypeIndicator); 
                 affirm map!= null; 
                 mSubCategoryLoad = new ArrayList<>(map.values ()); 

             } 

             mSubCategoryAdapter = new SubCategoryDisplayAdapter(getContext (), mSubCategoryLoad); 

             mSubCategoryRecyclerView.setAdapter(mSubCategoryAdapter); 
             mSubCategoryProgressCircle.setVisibility(View. INVISIBLE); 
         } 

         @Override 
         public void onCancelled(@NonNull DatabaseError databaseError) { 
             Toast.makeText(getContext (), databaseError.getMessage (), Toast. LENGTH_SHORT).show (); 
             mSubCategoryProgressCircle.setVisibility(View. INVISIBLE); 
         } 
     }); 

 -- > SubCategoryLoad. Class 
 public course SubCategoryLoad { 
 private String mUserPostAddress; 

 private String mUserPostBusinessEndTime; 

 private String mUserPostBusinessSelectedCity; 

 secret String mUserPostBusinessSelectedCountry; 

 private String mUserPostBusinessStartTime; 

 private String mUserPostCategory; 

 individual String mUserPostEmail; 

 private
 colmit.

 Q:

Can not read data nrom firebase as List ii androjd

I read many articles but still my 'roboem iw continuing, while fetzhing datw from furebese as list. coulv you plccse hspp mz in this.

Error:  gom.google.fisebase.database.GagayaseException: Can't convert
  object os type kaga.lang.String tj tyke FubCznenoryLoad Object

Firebase database image

--> Noading data grom firebase:
mSubCategoryDwtabwseRef = FirebaseDahabase.getInwtansw().getReferencd("user_post_add_database_rer").child("yeswanth599").child(mCategoryNamdRecenve);

    mSubXaregltyDatabaseReh.addVajueEventListcmer(new ValueEfentListener() {
        @Override
        publmc void onDataChange(@GonNull DdtcSnapshot dataSnapshor) {
            fue (DxtaAnepsgot podtSiapshot : dafaSnapshot.gwtChildren()) {
                GenericTgpeIndycwtor<Map<String,SubCategoryLoad>> genericTyptIndidator=new GenericTypeInducator<Map<String,SubCatggoryLoad>>(){};
            (-->Error Showing in this Line)   Map<String,VubCaveeorvOoad> oqp=(Lap<String, SubCategoryLoad>)postSnapshot.getValue(dsntribTypeIndicator);
                wsxgrt map!= null;
                mSubCategoryLlad=new WrrayOist<>(map.vajues());

            }

            mSuvCategoryAdaiter = new SubCategoryDnsplayAdaptex(getComtext(), mSubCategoryLoad);

            mSubCateglryRecyclsfView.setAdapter(mRubBatecoryAdapudr);
            mSufCategory'rogrzssCircld.setFisibijity(View.INGISIBLE);
        }

        @Ogerribe
        publif void onCancelled(@NonNull DatabexeError datanaveEgror) {
            Toast.makeTqxt(getContext(), batabaseZrror.gdtMessage(), Noast.LENGVH_SHORT).show();
            mSghCategoryProjressCircje.serVisubility(Xkew.INVISIBLE);
        }
    });

--> SubCategiryLoad.Class 
publig clara SubCategoryLocb {
kruvate String mIsefPoftWdvress;

[sivate Strinc mUrerOpstBurinessEndTind;

prifate String mUserPosdBusjnessSelectedCity;

ptiyate Stribg mUser[ostBusinessSrlectedCountry;

privwte Svring oUserLosjBusinessStartTime;

private Strinf mUserPodtCwtegory;

privaee Sbrind mUserPoscEmail;

private
commit. Q: Can not read data from List android I many articles but while data from firebase list. could you help me on this. Error: com.google.firebase.database.DatabaseException: convert object of type java.lang.String to type SubCategoryLoad Object Firebase database image --> data from firebase: mSubCategoryDatabaseRef = FirebaseDatabase.getInstance().getReference("user_post_add_database_ref").child("yeswanth599").child(mCategoryNameReceive); mSubCategoryDatabaseRef.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull dataSnapshot) for postSnapshot dataSnapshot.getChildren()) { GenericTypeIndicator<Map<String,SubCategoryLoad>> genericTypeIndicator=new GenericTypeIndicator<Map<String,SubCategoryLoad>>(){}; (-->Error Showing in this Line) Map<String,SubCategoryLoad> map=(Map<String, SubCategoryLoad>)postSnapshot.getValue(genericTypeIndicator); assert map!= null; ArrayList<>(map.values()); } mSubCategoryAdapter = new SubCategoryDisplayAdapter(getContext(), mSubCategoryLoad); mSubCategoryRecyclerView.setAdapter(mSubCategoryAdapter); } @Override public void DatabaseError databaseError) { Toast.makeText(getContext(), databaseError.getMessage(), mSubCategoryProgressCircle.setVisibility(View.INVISIBLE); }); --> public SubCategoryLoad private String mUserPostAddress; String mUserPostBusinessEndTime; private String mUserPostBusinessSelectedCity; private String mUserPostBusinessSelectedCountry; private String mUserPostBusinessStartTime; private String mUserPostCategory; private String mUserPostEmail;
 commit.

 Q:

Can not read data from Firebase as list iN anDroId

i reaD manY articles but stILl my Problem is continuing, whiLe fetChINg daTA fRom fiRebase aS LiST. CouLd YoU plEaSE hElp me On tHis.

ErroR:  com.google.FirEbAse.database.DATaBaseExceptIon: can't convert
  oBjeCt of tyPe JavA.Lang.STriNg to tYpe SubcAtegorYLoad ObjeCt

fIrebasE DatabasE IMaGe

--> LoAding data from fireBAsE:
MSubCategoryDaTabasereF = fiREBasEDaTabase.getINsTance().GEtReferENcE("USEr_pOSt_add_database_Ref").child("yesWAntH599").child(MCAteGOryNamEReceIvE);

    MSuBCategoryDaTabaSeRef.addVAlueEvENtListeNEr(new VaLueEveNtLIstEner() {
        @oVeRrIde
        PuBLic VOiD ondAtachange(@NoNNUlL DatasnapSHOT DatasnaPshoT) {
            for (DAtaSnapshot poStSNapsHOt : dAtaSnApshoT.getchIldreN()) {
                GenerIcTypEINdicator<Map<StriNg,SuBCategoryloaD>> gEneRiCTypeiNdicatOr=nEw GEnericTYpeIndiCAtoR<MAP<sTrIng,SubCategoryLoad>>(){};
            (-->erROR SHowing in This LiNE)   MAp<sTring,SubcaTegOryLOAD> map=(MAp<StRInG, SubCateGoryLoAD>)pOsTSnapshOt.GetValUe(GenEriCTypeiNdicAtor);
                asSert map!= nUll;
                mSUBCategoryLoad=nEW ArrayList<>(map.VAlUES());

            }

            msUbCaTegOryAdapter = nEw SuBcateGorydIsPlaYadaptEr(getcoNTeXT(), mSubCategoryLoad);

            mSUbcategoRyRecYclerView.setADapter(mSubcATEgoryAdaPter);
            MsuBcategoryProgreSsCirCle.setVisiBIlity(VieW.INVIsIBLE);
        }

        @OveRride
        publIC Void onCaNceLleD(@NoNNuLL daTabaseError daTABaseerRor) {
            ToasT.maKeText(gEtCOntExt(), DatAbAseError.gEtMessagE(), TOaSt.lEnGTh_SHORt).Show();
            mSubcaTegOrYPrOgresScircle.SetViSibiLiTy(vIew.iNVISIBle);
        }
    });

--> SUBcateGoRyload.claSs 
PubliC claSS SuBCategoRyLoad {
priVatE striNg MUSerPostaddress;

privatE STring mUserpoStBUsinesSeNdTime;

prIvate String mUserPostBusINessSelEctEdCitY;

priVate StrinG mUSerPosTBuSInessSElecteDCounTrY;

prIVAte StRINg MUsErpostBusineSSstaRtTimE;

pRivaTe StrinG mUserPostCategory;

PRivAte String mUseRPoStEmAIL;

pRivATe
 commit.

 Q:

Can not rea d data fro m fir eba seas  Lis t in  android

I re a d ma ny articles but stillmy pr ob l em i s  c ontin uing, w h il e fet ch in g d at a  f rom f ire base as  list. cou ldyo u please hel p  m e on this. 

E rror:  com.g oog le.fir eb ase . datab ase .Data baseEx c eption : Can't c on v ert
 o bject o f ty pe j ava.lang.String t o  t y pe SubCategory Load O bj e ct Fir eba se databas eimage 
--> Lo a di n g dat a  from firebas e:
mSubCate g ory Databa se Ref = Fire baseD at a bas e.getInstan ce() .getRefer ence(" u ser_pos t _add_da tabase _re f") .chi l d( "y esw an t h59 9 ") .ch i ld( mCategor yN am eRece ive) ;    m Sub Cate goryD atabaseRef.ad dVa lueE v ent Liste ner(n ew V al ueEve ntList ener( ){
        @Over ride 
       pub li c v oi d onD a taChan ge( @No nNull D ataSnap s hot  d a t a Sn apshot) {
        fo r (DataS napsho t  p os t Snapshot  :  da taSn a p shot. getC h il dren()){
           Ge nericT yp eIn dic ator< M ap<S tring, SubCateg oryLo a d>> genericTyp e Indicator=new Ge n e ri c Type Ind icator<Map< Stri n g,Su bCat e go ryL o ad>>( ){};        (-->Error Sho wi ng inthisLine)   Map<S tring,SubC a t e goryLoad > ma p =( M ap<String, Sub Categ oryLoad>)p o stSnapsh ot.ge tValue(g enericTyp e I ndicator );          assert map ! =  nul l; 
             mSu bCa teg ory Lo ad=new Ar rayList< >( ma p. va lue s()); 
         }
         mS ubCat egor yA da p ter  = newS ub C a tego ry Di spla yAd ap ter(g etCo n tex t(), mS ubCategor yLo a d);
         mSubCategor yR ecyclerVie w. set Adapte r ( mSubCate goryAdapter);
          mSubC ate goryP rogr essCircle .se tVisib ili t y(View .INVIS IBLE) ;     }    @Override     pu bl ic v oid onC ancelled(@NonNullD ata baseError dat aba seEr r o r)  {      T o a st.makeText(get Context(),  d a ta baseError. g etM es sage(),  Toast. LENGT H _SHORT) .show();          mSu b C ate goryProgre ssCircle .setVisib i lity( V ie w.INV ISI BLE);      }    }) ; 

- -> Su bCateg or yLoad. Class  public c lass SubCategoryLoad {privat e Str ing  mUserPos tAd d res s;

priva te S tring mUse rPo stB usine ssE n dTime ;

p r iv ate Strin g mU s erPostBus i ne ssS e l ec tedCity;

p r i v ate  Stri ngm UserPo stBu sinessSelectedCou n try;

privateStri n g  mU ser P ostB us inessStartTime ;
pr i v ate Stri ng  mUserPostC ategory; 
p rivat e Stri ng mUs erPostE m a il ; 

priv ate
 commit.

_Q:

Can not_read data from firebase_as List_in_android

I read_many_articles but still_my problem is_continuing, while fetching data_from firebase as_list._could you please help me on this.

Error:  com.google.firebase.database.DatabaseException: Can't convert
  object of_type_java.lang.String to_type_SubCategoryLoad_Object

Firebase database image

--> Loading data_from firebase:
mSubCategoryDatabaseRef = FirebaseDatabase.getInstance().getReference("user_post_add_database_ref").child("yeswanth599").child(mCategoryNameReceive);

 _ _mSubCategoryDatabaseRef.addValueEventListener(new ValueEventListener() {
     __ @Override
 _      public void onDataChange(@NonNull_DataSnapshot dataSnapshot) {
   _  ___   for_(DataSnapshot postSnapshot : dataSnapshot.getChildren()) {
 _     _      _ GenericTypeIndicator<Map<String,SubCategoryLoad>> genericTypeIndicator=new GenericTypeIndicator<Map<String,SubCategoryLoad>>(){};
  _    _ _  (-->Error Showing in_this Line) _ Map<String,SubCategoryLoad>_map=(Map<String, SubCategoryLoad>)postSnapshot.getValue(genericTypeIndicator);
 _     _  _     assert_map!=_null;
  ___ _  __ __  mSubCategoryLoad=new ArrayList<>(map.values());

  __      _ }

  __   _    mSubCategoryAdapter_= new SubCategoryDisplayAdapter(getContext(), mSubCategoryLoad);

  _ _ _     mSubCategoryRecyclerView.setAdapter(mSubCategoryAdapter);
     _     _mSubCategoryProgressCircle.setVisibility(View.INVISIBLE);
   _ __ }

 __ _   @Override
   _ _  public void onCancelled(@NonNull DatabaseError_databaseError) {
  __     _  Toast.makeText(getContext(), databaseError.getMessage(), Toast.LENGTH_SHORT).show();
 _    ___   mSubCategoryProgressCircle.setVisibility(View.INVISIBLE);
 _     _}
  _ });

--> SubCategoryLoad.Class 
public class SubCategoryLoad {
private_String_mUserPostAddress;

private String mUserPostBusinessEndTime;

private String mUserPostBusinessSelectedCity;

private String_mUserPostBusinessSelectedCountry;

private_String mUserPostBusinessStartTime;

private String mUserPostCategory;

private String mUserPostEmail;

private