zoukankan      html  css  js  c++  java
  • Android中editText使用报错

    在activity_main.xml文件中添加了editText控件

     <EditText
            android:id="@+id/edit_text"
            android:hint="@the next"   

      <!--用the next或者@the next都报错,要使用@string/the next,用标准写法在string.xml文件中配置键值对(name:the next   vlaue:下一步),注意键值对有未使用的也会报错-->
            android:inputType="text"
            android:text="@string/string1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_alignLeft="@+id/textView"
            android:layout_below="@+id/textView"
            android:layout_marginTop="36dp"
            android:ems="10" /> 

    提示error: Error: No resource type specified (at 'hint' with value '@string')

    以及Hardcoded string "the next", should use @string resource

    error: No resource identifier found for attribute ‘backIcon’ in package三个错误

    第三个错误属于自定义控件的命名空间问题,我贴出个链接自己去看http://blog.sina.com.cn/s/blog_6aefcbed01013rpc.html  

    当然我这之所以报错纯属我把inputType拼错了

  • 相关阅读:
    程序由多个文件组成时、 头文件
    c++ 数组,变量,指针,引用, 初始化,赋值
    linux 远程装机
    linux中firewall与iptables防火墙服务
    linu samba服务
    linux 中iscsi服务
    Linux中apache服务
    linux dns高速缓存
    linux 网络配置
    linux 数据库管理
  • 原文地址:https://www.cnblogs.com/DZayxj520/p/6092142.html
Copyright © 2011-2022 走看看