Missing styles. Is the correct theme chosen for this layout?

后端 未结 21 1342
慢半拍i
慢半拍i 2020-11-28 19:27

Missing styles. Is the correct theme chosen for this layout? Use the Theme combo box above the layout to choose a different layout, or fix the theme style ref

21条回答
  •  南方客
    南方客 (楼主)
    2020-11-28 20:14

    Most of the errors in XML happen due to the names you have given to the resources.

    Images stored in the drawable folder need to be named in a proper manner. just check these things:

    1. Are there any duplicate files? if so remove the duplicates. (For example "image.jpg" and "image.png" are not allowed in the same time. It will not show any errors but sometimes it will show that R.java cannot be resolved)
    2. Do the filenames contains any uppercase letters? If so right click on that file->refactor->rename and rename it with all lowercase, no hyphens, and only a-z and 0-9 are allowed.

    Just make sure of the above cases.

提交回复
热议问题