小众知识

Error: No resource found that matches the given name (at 'text' with value
2014-08-15 00:50:25   来源:   评论:0 点击:

No resource found that matches the given name (at text with value @string hello2 ) Error:(12, 23) Execution failed for task :app:processDebugResources > com android ide common internal LoggedErrorException: Failed to run command

错误提示:

Error:(12, 23) No resource found that matches the given name (at 'text' with value '@string/hello2'). Error:(12, 23) Execution failed for task ':app:processDebugResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Program Files (x86)\Android\android-studio\sdk\build-tools\android-4.4W\aapt.exe package -f --no-crunch -I C:\Program Files (x86)\Android\android-studio\sdk\platforms\android-20\android.jar -M D:\Git\Android\HelloWorld\app\build\intermediates\manifests\debug\AndroidManifest.xml -S D:\Git\Android\HelloWorld\app\build\intermediates\res\debug -A D:\Git\Android\HelloWorld\app\build\intermediates\assets\debug -m -J D:\Git\Android\HelloWorld\app\build\generated\source\r\debug -F D:\Git\Android\HelloWorld\app\build\intermediates\libs\app-debug.ap_ --debug-mode --custom-package org.predream.helloworld -0 apk Error Code: 1 Output: D:\Git\Android\HelloWorld\app\build\intermediates\res\debug\layout\activity_suese.xml:11: error: Error: No resource found that matches the given name (at 'text' with value '@string/hello_worldd').

解决方法:

在/res/values/strings.xml 添加上你问题里面补充的内容就可以了

 

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <string name="hello">这是第一个Activity。</string>
    <string name="hello2">这是第二个Activity。</string>
    <string name="app_name">Examples_03_04</string>

</resources>

相关热词搜索:error

上一篇:You need to use a Theme.AppCompat theme (or descendant) with this activity
下一篇:HTML5开发手机应用--viewport的作用

分享到: 收藏
评论排行
最新发布