android – 找不到与layout_hint中给定名称匹配的资源

我是新的,实际上这是我对 android程序的第一次尝试.我正在关注android开发者培训网站.我的activity_main.xml如下所示:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"

tools:context=".MainActivity" >

<EditText android:id="@+id/edit_message"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    android:layout_hint="@string/edit_message"/>

现在它显示错误和警告,如:

警告 – 此文本字段未指定inputType或提示

错误错误错误:找不到与给定名称匹配的资源(在’layout_hint’中,值为’@ string / edit_message’)

解决方法

您需要在res / values / strings.xml文件中定义edit_message的值.至于警告,请查看 this link.

相关文章

Android性能优化——之控件的优化 前面讲了图像的优化,接下...
前言 上一篇已经讲了如何实现textView中粗字体效果,里面主要...
最近项目重构,涉及到了数据库和文件下载,发现GreenDao这个...
WebView加载页面的两种方式 一、加载网络页面 加载网络页面,...
给APP全局设置字体主要分为两个方面来介绍 一、给原生界面设...
前言 最近UI大牛出了一版新的效果图,按照IOS的效果做的,页...