您正在使用Android工作室进行应用程序开发。当我构建应用程序时,我收到此错误。我不知道如何解决这个问题。请帮我解决这个错误。
Error:Execution failed for task ':app:mergeDebugResources'.
> Unsupported type 'String' in file /Users/win7/Documents/Android Development/Workspace/sample/app/src/main/res/values/strings.xml
我的应用字符串xml是
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Sample</string>
<string name="hello_world">Hello world!</string>
<string name="action_settings">Settings</string>
<string name="firstscreenTitle">SCREEN ONE</string>
<string name="secondscreenTitle">SCREEN TWO</string>
<String name="thirdscreenTitle">SCREEN THREE</String>
</resources>
答案 0 :(得分:4)
<String name="thirdscreenTitle">SCREEN THREE</String>
点击此处&#39; S&#39;在大写字母中,它应该是小写字母,将其更改为&#39; s&#39;它会起作用。
更改:
<String name="thirdscreenTitle">SCREEN THREE</String>
to
<string name="thirdscreenTitle">SCREEN THREE</string>
答案 1 :(得分:1)
将行中的<String name="thirdscreenTitle">SCREEN THREE</String>
更改为<string name="thirdscreenTitle">SCREEN THREE</string>
。您已将String
与大写S
一起使用。您需要对s
使用小写string
。