Home > Mobile >  With Toast when compile without exception, run error, about the context
With Toast when compile without exception, run error, about the context

Time:11-21

Error: android content. Res. Resources $NotFoundException: String resource ID # 0 x0


Is in RecyclerView click method Toast.
BookRecyclerAdapter. SetOnItemClickListener (new bookRecyclerAdapter. OnItemClickListener () {
@ Override
Public void onItemClick (int position) {
System. Out. Println (position);
Toast. MakeText (OnlineBookstoreActivity. This, 0, Toast. LENGTH_SHORT), show ();

}
});

Toast. MakeText (OnlineBookstoreActivity. This, 0, Toast. LENGTH_SHORT), show ();
This sentence error
How to change things

CodePudding user response:

Toast. MakeText (OnlineBookstoreActivity. This, "", Toast. LENGTH_SHORT), show ();

CodePudding user response:

Toast. MakeText (OnlineBookstoreActivity. This message "XXXX", Toast. LENGTH_SHORT), show ();

CodePudding user response:

Among the parameters of prompting information, either a string or a string resource id that you pass the int, though not an error, but there will be warned, don't run time should be submitted to the could not find the abnormal resources
  • Related