Home > Mobile >  Android development flash back
Android development flash back

Time:10-08

Android development, the use of RecyclerView, establish library dependencies, activity only display layout, the layout in the configuration file if flash back, add the following code will compile without problems, don't understand what the book says the use of the library depends on how to include the complete package path, could you tell me what flash back may cause flash back? The android: id="@ + id/msg_recycler_view"
Android: layout_width="match_parent"
Android: layout_height="0 dp"
Android: layout_weight="1"/& gt;

CodePudding user response:

Flash back with an error message, you look at the information in the logcat

CodePudding user response:

RecyclerView is a space that contains a resource file, I think you only contains a Java file to import, and not contain resources such as file layout and error, need to change your way of import,

CodePudding user response:

reference 1st floor zhang106209 response:
flash back with an error message, you have a look at the information in the logcat

Thank you, look logcat found the solution,

CodePudding user response:

reference 2 floor Robin. Zhao response:
RecyclerView is a space that contains the resource file, I think you only contains a Java file to import, and not contain resources such as file layout and error, need to change your way of import,

Layout file also contains,
Android. Please support. V7. Widget. RecyclerView and
Androidx. Recyclerview. Widget. What is the difference between recyclerview? I write the second one, there is no flash back problem again,

CodePudding user response:

reference book, 4/f, small house reply:
Quote: refer to the second floor. Robin Zhao response:
RecyclerView is a space that contains the resource file, I think you only contains a Java file to import, and not contain resources such as file layout and error, need to change your way of import,

Layout file also contains,
Android. Please support. V7. Widget. RecyclerView and
Androidx. Recyclerview. Widget. What is the difference between recyclerview? I write the second one, there is no flash back problem again,
do not have what distinction, you are using is androidx version, not long ago a jar android v4 v7 to distinguish, the similar, upgrade ~
  • Related