兄弟,No resource found that matches the given name (at 'drawable' with value '@drawable/list_selected_background'). 看这句话,在drawable文件夹下。没有list_selected_background 文件
那个@小倪飞刀,你说的drawable下面缺少个list_selected_background,因为我也不大懂(一介学渣请见谅),就去若水大神给的那些源码中去看了也没有找到。 但是后来我觉得应该是软件抽了,因为我上度娘找到了一个使用clean命令的方法,clean了下后四个错误变成了两个: Description Resource Path Location Type error: Error parsing XML: not well-formed (invalid token) activity_main.xml /Polarnews/res/layout line 62 Android AAPT Problem Description Resource Path Location Type R cannot be resolved to a variable MainActivity.java /Polarnews/src/com/polar/polarnews/activity line 13 Java Problem我之前也遇到过src处有红叉的现象,那时候是调了最小SDK的,因为有人说什么最小都应该是ap14,改了就没事了,我在想是不是我的Android4.0的sdk设置不对?
看这句话,在drawable文件夹下。没有list_selected_background 文件
但是后来我觉得应该是软件抽了,因为我上度娘找到了一个使用clean命令的方法,clean了下后四个错误变成了两个:
Description Resource Path Location Type
error: Error parsing XML: not well-formed (invalid token) activity_main.xml /Polarnews/res/layout line 62 Android AAPT Problem
Description Resource Path Location Type
R cannot be resolved to a variable MainActivity.java /Polarnews/src/com/polar/polarnews/activity line 13 Java Problem我之前也遇到过src处有红叉的现象,那时候是调了最小SDK的,因为有人说什么最小都应该是ap14,改了就没事了,我在想是不是我的Android4.0的sdk设置不对?
2,你HorizontalScrollView 结束符写了两次 一次是起始标签后面加了/就表示结束了这个标签<HorizontalScrollView/> 还有一次是 </HorizontalScrollView>
2.第二个改了,现在的错误貌似有少(因为太多我也没太留意数目了),但还是十分感激指出。谢谢
activity 13行报错 没贴代码 看不到
再次摆上代码:
<RelativeLayout 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" tools:context="work.hellovenus.MainActivity" > <RelativeLayout
android:id="@id/titlebar_layout"
android:layout_width="m_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignRight="@id/categorybar_layout"
android:background="@drawable/titlebar_background" > <TextView
android:id="@id/titlebar_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true"
android:layout_marginLeft="10dp"
android:layout_marginTop="-10dp"
android:text="@string/app_name"
android:textSize="25.0sp" />
<Button
android:id="@id/titlebar_refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/titlebar_button_refresh_selected"
android:layout_alignParentRight="true"
android:layout_marginTop="1.0dip"
android:layout_marginRight="5.0dip"
/> </RelativeLayout>
<RelativeLayout
android:id="@id/categorybar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/categorybar_background"
android:layout_marginTop="45.0dip"
>
<Button
android:id="@id/category_arrow_right"
android:layout_width="6.0dip"
android:layout_height="10.0dip"
android:background="@drawable/categorybar_right_arrow"
android:layout_marginLeft="2.0dip"
android:layout_marginRight="10.0dip"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
/>
<HorizontalScrollView
android:id="@id/category_scrollview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="6.0dip"
android:scrollbars="none"
android:layout_toLeftOf="@id/category_arrow_right"
android:layout_centerVertical="true"
>
<LinearLayout
android:id="@id/category_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_vertical"
/>
</HorizontalScrollView>
</RelativeLayout>
<ListView
android:id="@+id/news_list"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:listSelector="@drawable/news_list_item_selector"
android:cacheColorHint="#00000000"
android:divider="@drawable/list_separator_line"
/></LinearLayout>这个在空白的59行处显示的 no element found是种马一回事?
clean
删除59行试试???
----------------------------------
根布局是“RelativeLayout”,后变成“LinearLayout ”
还有
clean
删除59行