我已经开始开发一个应用程序,我没有更改类,也没有更改清单,只创建了 xml 布局:
<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"
android:background="#111111"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".Playing" >
<RelativeLayout
android:id="@+id/rlcontrols"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true" >
<Button
android:id="@+id/bplay"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_below="@+id/tvalbum"
android:layout_centerHorizontal="true"
android:background="@drawable/play"
android:contentDescription="@+String/play" />
<Button
android:id="@+id/bprevious"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_below="@id/tvalbum"
android:layout_marginRight="10dp"
android:layout_toLeftOf="@id/bplay"
android:background="@drawable/previous"
android:contentDescription="@+String/play" />
<Button
android:id="@+id/bnext"
android:layout_width="60dp"
android:layout_height="60dp"
android:layout_below="@id/tvalbum"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@id/bplay"
android:background="@drawable/next"
android:contentDescription="@+String/play" />
<Button
android:id="@+id/brepeat"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignBottom="@id/bnext"
android:layout_marginLeft="10dp"
android:layout_toRightOf="@id/bnext"
android:background="@drawable/repeat"
android:contentDescription="@+String/play" />
<Button
android:id="@+id/bshuffle"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_alignBottom="@id/bprevious"
android:layout_marginRight="10dp"
android:layout_toLeftOf="@id/bprevious"
android:background="@drawable/shuffle"
android:contentDescription="@+String/play" />
<!-- <SeekBar
android:id="@+id/songProgressBar"
android:layout_width="fill_parent"
android:layout_marginTop="10dp"
android:layout_height="wrap_content"
android:progressDrawable="@drawable/progress"
android:thumb="@drawable/seeker"
android:layout_below="@id/bplay" /> -->
</RelativeLayout>
<TextView
android:id="@+id/tvalbum"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/rlcontrols"
android:gravity="center"
android:text="@string/album"
android:textSize="20sp" />
<TextView
android:id="@+id/tvartist"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/tvalbum"
android:gravity="center"
android:text="@string/artist"
android:textSize="20sp" />
<TextView
android:id="@+id/tvtitle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@id/tvartist"
android:gravity="center"
android:text="@string/title"
android:textSize="25sp" />
<ImageView
android:id="@+id/ivalbumart"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_above="@id/tvtitle"
android:contentDescription="@+String/albumart"
android:src="@drawable/albumart" />
</RelativeLayout>
调试堆栈:
Thread [<1> main] (Suspended (exception RuntimeException))
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2100
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2125
ActivityThread.access$600(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 140
ActivityThread$H.handleMessage(Message) line: 1227
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 137
ActivityThread.main(String[]) line: 4898
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 511
ZygoteInit$MethodAndArgsCaller.run() line: 1006
ZygoteInit.main(String[]) line: 773
NativeStart.main(String[]) line: not available [native method]
当我启动活动时说找不到来源
我不知道这意味着什么,所以任何帮助都会非常感谢