当前位置:编程学习 > wap >>

android运行报错


我新建了一个项目,值写了layout文件,但是运行的时候老师报错。如上图所示,求大神指导,什么原因? android 报错 --------------------编程问答-------------------- 靠。。。你就不能发全一点。。。 --------------------编程问答--------------------
望大神指教! --------------------编程问答-------------------- 看下是不是你bind的service没有起来 --------------------编程问答--------------------
引用 3 楼 yuleyouxi 的回复:
看下是不是你bind的service没有起来

怎么看? --------------------编程问答-------------------- 检查下有没有这个service,还有bindservice之后会回调ServiceConnection的onServiceConnected有没有加上 --------------------编程问答--------------------
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical" 
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin" >
    

    <TextView
        android:id="@+id/musicName"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/musicName" />

    <ProgressBar
android:id="@+id/musicProcess"
style="@android:style/Widget.ProgressBar.Horizontal"
        android:layout_width="fill_parent"
        android:paddingTop="@dimen/activity_vertical_margin"
        android:paddingBottom="@dimen/activity_vertical_margin"
        android:layout_height="wrap_content"/>
<LinearLayout 
    android:orientation="horizontal"
    android:layout_width="match_parent"
    android:layout_height="100dp">
        
    <ImageView
        android:id="@+id/prev" 
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:contentDescription="@string/prev"
        android:layout_weight="1"
        android:layout_gravity="center"
        android:src="@drawable/prev"/>
         
    <ImageView
        android:id="@+id/start_pause" 
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_weight="1"
        android:layout_gravity="center_horizontal"
        android:contentDescription="@string/prev"
        android:src="@drawable/pause"/>
        
    <ImageView
        android:id="@+id/next" 
        android:contentDescription="@string/next"
        android:layout_width="80dp"
        android:layout_height="80dp"
        android:layout_weight="1"
        android:layout_gravity="center"
        android:src="@drawable/next" />
</LinearLayout>
</LinearLayout>
这个是我写的布局文件,只写了这个,然后在Activity中显示,运行就报错。这个布局文件写的有没有什么问题啊? --------------------编程问答-------------------- ExchangeService是你bind的吗?你unbind了吗?看上去和layout没什么关系。
补充:移动开发 ,  Android
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,