Java – no resource matching the given name can be found (in ‘text’, the value is’ @ string / continue_label ‘)
•
Java
Let me start by saying I'm a brand new Android programmer I'm using pragmatic's Hello Android book (3rd Edition) I'm studying a popular Sudoku game example that will be placed in main After copying the code from the XML file, I received the following error:
error: Error: No resource found that matches the given name (at 'background' with value '@color/background') . error: Error: No resource found that matches the given name (at 'text' with value '@string/main_title'). error: Error: No resource found that matches the given name (at 'text' with value '@string/continue_label'). error: Error: No resource found that matches the given name (at 'text' with value '@string/new_game_label'). error: Error: No resource found that matches the given name (at 'text' with value '@string/about_label'). error: Error: No resource found that matches the given name (at 'text' with value '@string/exit_label').
They may all be relevant, but after some search, I don't know what the problem is Any suggestions?
Solution
Everything you say wrong You have a res folder where your resources like strings / images / layouts can reside You are referring to resources, but they do not exist You are quoting about_ Label string, but there is no label string about in your string XML_ Label and its value See res - > strings Check all your XML files and put the resources you try to use into the program
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码