没有资源的发现,给定的名称匹配:ATTR'homeHint“ [英] No resource found that matches the given name: attr 'homeHint'

查看:180
本文介绍了没有资源的发现,给定的名称匹配:ATTR'homeHint“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只得到Android Studio中的下列错误。 Eclipse的正常工作。

错误:没有资源发现,给定的名称匹配:ATTRhomeHint。
没有资源的发现,给定的名称匹配:ATTR'homePageBtn

 <样式名称=mytheme的父=@安卓风格/主题>
<项目名称=homePageBtn> @风格/ homePageBtn< /项目>
    <项目名称=homeHint> @风格/ homeHint< /项目>
< /风格><样式名称=homePageBtn父=@风格/ homeBtn>
    <项目名称=机器人:TEXTSIZE>&42SP LT; /项目>
< /风格><样式名称=homeBtn父=@款式/安卓Widget.Button>
    <项目名称=机器人:layout_width> match_parent< /项目>
    <项目名称=机器人:layout_height>&WRAP_CONTENT LT; /项目>
    <项目名称=机器人:layout_marginLeft>&8DP LT; /项目>
    <项目名称=机器人:layout_marginRight>&8DP LT; /项目>
    <项目名称=机器人:layout_marginBottom> 10dp< /项目>
    <项目名称=安卓重力>&CENTER_HORIZONTAL LT; /项目>
    <项目名称=机器人:背景> @彩色/ color_btn_bg< /项目>
    <项目名称=机器人:文字颜色> @彩色/ color_home_btn_text< /项目>
    <项目名称=机器人:TEXTSIZE>&42SP LT; /项目>
< /风格>


解决方案

请尝试一下。只需按一下按钮,与图像中的箭头,然后选择默认设备,然后单击确定。告诉我,如果它的作品! :)

I am getting the following errors only in Android Studio. Eclipse is working correctly.

Error:No resource found that matches the given name: attr 'homeHint'. No resource found that matches the given name: attr 'homePageBtn'.

<style name="myTheme" parent="@android:style/Theme">
<item name="homePageBtn">@style/homePageBtn</item>
    <item name="homeHint">@style/homeHint</item>
</style>

<style name="homePageBtn" parent="@style/homeBtn">
    <item name="android:textSize">42sp</item>
</style>

<style name="homeBtn" parent="@style/android:Widget.Button">
    <item name="android:layout_width">match_parent</item>
    <item name="android:layout_height">wrap_content</item>
    <item name="android:layout_marginLeft">8dp</item>
    <item name="android:layout_marginRight">8dp</item>
    <item name="android:layout_marginBottom">10dp</item>
    <item name="android:gravity">center_horizontal</item>
    <item name="android:background">@color/color_btn_bg</item>
    <item name="android:textColor">@color/color_home_btn_text</item>
    <item name="android:textSize">42sp</item>
</style>

解决方案

Please try it out. Just click on the button with an arrow in the image and then select "Devices Default" and click OK. Tell me if it works! :)

这篇关于没有资源的发现,给定的名称匹配:ATTR'homeHint“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆