layout文件放在新的项目里就报错,真奇怪呀

qiuqingpo 2013-11-05 10:06:07
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="#111"
>

<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_centerInParent="true" >

<ImageView
android:id="@+id/shakeBg"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:src="@drawable/shakehideimg_man2" />

<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:orientation="vertical" >

<RelativeLayout
android:id="@+id/shakeImgUp"
android:layout_width="fill_parent"
android:layout_height="190dp"
android:background="#111">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:src="@drawable/shake_logo_up"
/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/shakeImgDown"
android:layout_width="fill_parent"
android:layout_height="190dp"
android:background="#111">
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:src="@drawable/shake_logo_down"
/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

<RelativeLayout
android:id="@+id/shake_title_bar"
android:layout_width="fill_parent"
android:layout_height="45dp"
android:background="@drawable/title_bar"
android:gravity="center_vertical" >
<Button
android:layout_width="70dp"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:text="返回"
android:textSize="14sp"
android:textColor="#fff"
android:onClick="shake_activity_back"
android:background="@drawable/title_btn_back"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="摇一摇"
android:layout_centerInParent="true"
android:textSize="20sp"
android:textColor="#ffffff" />
<ImageButton
android:layout_width="67dp"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginRight="5dp"
android:src="@drawable/mm_title_btn_menu"
android:background="@drawable/title_btn_right"
android:onClick="linshi"
/>
</RelativeLayout>


<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:content="@+id/content"
android:handle="@+id/handle" >
<Button
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"

android:background="@drawable/shake_report_dragger_up" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#f9f9f9" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="fitXY"
android:src="@drawable/shake_line_up" />
</LinearLayout>
</SlidingDrawer>

</RelativeLayout>


在一个项目里是正常的,复制到新的项目就会报错
错误提示:java.lang.StackOverflowError
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- Button (Change to android.widget.Button, Fix Build Path, Edit XML)

我看也没有什么具体的错误呢,这该怎么办呢
...全文
57 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
qiuqingpo 2013-11-05
  • 打赏
  • 举报
回复
自己解决了哟,少了资源文件,希望能帮到以后的朋友

80,357

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧