Android Error: No resource found ··· 'layout_above' with value '@id/···

关于android:id="@+id/" 和 android:id="@id/"的问题

本以为自己已经理解了这两个,无非就是第一次创建id时用+id/呗

但是没想到这里创建顺序是严格按照代码顺序来的,如:在RelativeLayout中

<RelativeLayout

````

<Widget1

android:layout_above="@id/widget_2"

````/>

<Widget2

android:id="@+id/widget_2"

````/>

<RelativeLayout/>

这样写会报错,大致说是Widget1找不到widget_2!!!!

原来需要在Widget1中这么写:android:layout_above="@+id/widget_2"

也就是在第一次遇到这个id时就创建它,放心,这个id还是Widget2的,只是先被Widget1拿去创建并引用了而已

Android Error: No resource found ··· 'layout_above' with value '@id/···

时间: 2024-08-25 23:07:15

Android Error: No resource found ··· 'layout_above' with value '@id/···的相关文章

Android出错问题:AndroidManifest.xml:2: error: No resource identifier found for attribute &#39;installLocatio

出错点: AndroidManifest.xml: error: No resource identifier found for attribute 'installLocation' in package 'android' 解决方法: 这是因为所使用的android中不支持该属性(installLocation),删除      android:installLocation="auto"即可,或者选择别的版本的android. Android出错问题:AndroidManife

Android 官网提供的Custom-view 编译出错--error: No resource identifier found for attribute

error: No resource identifier found for attribute in custom-views from http://developer.android.com 原来: <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:custom="http://schemas.android.com/apk/res/com.example

error: No resource identifier found for attribute &#39;format24Hour&#39; in package &#39;android&#39;

问题描述:这是在引入Android SDK api level 17中的ApiDemos时,报的错误,但是这个属性明明就是android自带的,怎么会报这种错误呢?百思不得其解,后来改了一下配置就好了,把Target  Api改成17就行了. 其实类似的问题都可以往这个方向思考:Android不同版本的兼容问题. 版权声明:本文为博主原创文章,未经博主允许不得转载. error: No resource identifier found for attribute 'format24Hour'

解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题

解决Android中No resource found that matches android:TextAppearance.Material.Widget.Button.Inverse问题http://blog.csdn.net/u012336923/article/details/48289485 /路径/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/v

安卓错误:error: No resource identifier found for attribute &#39;desc_on&#39; in package &#39;com.

错误原因: 在网上查找错误原因的时候,有文章说这是因为我的布局文件的命名空间没有添加有包名的那个命名空间,可是我检查布局文件完毕之后,发现我已经添加了,但是还是报这个异常错误,我的命名空间为:xmlns:myview="http://schemas.android.com/apk/res/com.example.settingView.view";后来我在另外一篇博文上终于发现了自己的错误原因,这个命名空间后面包名我添加错误了,命名空间后面的包名应该是AndroidManifest.x

Error: Expected resource of type xxx [ResourceType]

运行环境:Android Studio 1.4 gradle版本:2.10 工程编译没有问题,并且能在模拟器和真机上正常运行,但是当打包成Apk的时候,出现了 Error:Error: Expected resource of type color [ResourceType]  这个错误,导致打包不成功. 以下是出错地方的代码: private static RadioButton createGroupTabItem(Context context, MemberType data) { R

error: No resource identifier found for attribute &#39;desc_on&#39; in package &#39;com.

错误原因: 在网上查找错误原因的时候,有文章说这是因为我的布局文件的命名空间没有添加有包名的那个命名空间,可是我检查布局文件完毕之后,发现我已经添加了,但是还是报这个异常错误,我的命名空间为:xmlns:myview="http://schemas.android.com/apk/res/com.example.settingView.view";后来我在另外一篇博文上终于发现了自己的错误原因,这个命名空间后面包名我添加错误了,命名空间后面的包名应该是AndroidManifest.x

appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the gi

appcompat_v7\res\values-v21\themes_base.xml:191: error: Error: No resource found that matches the given name: attr 'android:XXX' 创建Android项目时,ADT会自动的创建一个名为appcompat_v7的 Support Library 项目,然后你会看到values21下面出现了很多的错误.具体原因不知 问题解决:将appcompat_v7使用最新的API 22,

解决IDEA下运行android项目 No resource found that matches the given name &#39;Theme.AppCompat.Light&#39;.

1.右击项目选择 解决IDEA下运行android项目 No resource found that matches the given name 'Theme.AppCompat.Light'.