Android Rendering Problems Couldn't resolve resource @string/app_name

前端 未结 3 2064
心在旅途
心在旅途 2021-02-16 00:28

I\'m new to android programming and I don\'t understand what I\'m doing wrong. I try to make a button like this in the xml file:

3条回答
  •  星月不相逢
    2021-02-16 01:06

    [Note that this answer was written in 2016 for Android Studio 2.0! Android Studio has changed significantly since then. This answer helped a lot of people at the time, but may no longer be relevant.]

    It's possible that the layout preview started drawing before all the files were processed. Android Studio and Eclipse both frequently suffer from tool synchronization problems.

    In many cases, simply refreshing the layout preview will solve this problem (of course I'm assuming that you do have the string app_name defined). The arrow marks the refresh button (so many buttons!).

提交回复
热议问题