Android ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord,Intent)行:2100 ;找不到源

Android ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord,Intent)行:2100 ;找不到源,android,android-layout,android-activity,Android,Android Layout,Android Activity,我开始开发一个应用程序,但我没有更改类,也没有更改清单,只创建了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:backg

我开始开发一个应用程序,但我没有更改类,也没有更改清单,只创建了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]  
Thread[main](挂起(异常运行时异常))
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord,Intent)行:2100
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord,Intent)行:2125
ActivityThread.access$600(ActivityThread,ActivityThread$ActivityClientRecord,Intent)行:140
ActivityThread$H.handleMessage(消息)行:1227
ActivityThread$H(处理程序)。dispatchMessage(消息)行:99
Looper.loop()行:137
ActivityThread.main(字符串[])行:4898
invokenactive(Object,Object[],Class,Class[],Class,int,boolean)行:不可用[本机方法]
调用(对象,对象…)行:511
ZygoteInit$MethodAndArgsCaller.run()行:1006
颧骨单位。主(字符串[])行:773
NativeStart.main(字符串[])行:不可用[本机方法]
当我启动活动时说找不到源


我不知道这意味着什么,所以任何帮助都是很好的,谢谢没有你的项目,我只能猜测,但这通常是由于清单文件不正确造成的。确保你的包是正确的,然后你需要说出你的活动类似于

<activity
     android:label="@string/app_name"
     android:name=".MyLaunchActivity" >
     <intent-filter >
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
     </intent-filter>
 </activity>
 <activity android:name=".My_Second_Activity" >
 </activity>

如果没有您的项目,我只能猜测,但这通常是由于清单文件不正确造成的。确保你的包是正确的,然后你需要说出你的活动类似于

<activity
     android:label="@string/app_name"
     android:name=".MyLaunchActivity" >
     <intent-filter >
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
     </intent-filter>
 </activity>
 <activity android:name=".My_Second_Activity" >
 </activity>

您是否尝试调试代码?我有一个类似的问题,看起来您缺少Android Vx.jar文件的源代码。。 请参考此链接,它可能会对您有所帮助。
您是否尝试调试代码?我有一个类似的问题,看起来您缺少Android Vx.jar文件的源代码。。 请参考此链接,它可能会对您有所帮助。
我遇到了一个类似的问题,只是因为我错过了appcompat_v7库。在我的例子中,假设我的项目名为Prj_A。 要知道PrjA需要哪个库,您必须阅读project.properties文件(请参阅项目的根目录)

对于project.properties文件中提到的所有资源,您需要添加该库。让我们说Lib_1,Lib_2。。。自由党 这意味着您必须从Prj_A导入project.properties文件请求的每个Lib_x“as android project”,然后转到Prj_A,右键单击properties,android。弹出一个窗口,看到底部显示Prj_A库的框架。确保在提到的每个库前面都有一个绿色标记

对于所有带有红色问号的库或每个缺少的库,您需要在显示库的框架中执行以下步骤: 单击“添加”按钮,将弹出一个包含所有候选库的窗口(即导入并在您的工作区中打开)。 如果您没有库,那么您需要先在工作区中导入并打开这些库


然后需要删除每个带有红色问号的库。因此,在显示库的框架中,单击带有红色“?”的库,然后单击删除按钮。然后单击应用。

我遇到了一个类似的问题,只是因为我错过了appcompat_v7库。在我的例子中,假设我的项目名为Prj_A。 要知道PrjA需要哪个库,您必须阅读project.properties文件(请参阅项目的根目录)

对于project.properties文件中提到的所有资源,您需要添加该库。让我们说Lib_1,Lib_2。。。自由党 这意味着您必须从Prj_A导入project.properties文件请求的每个Lib_x“as android project”,然后转到Prj_A,右键单击properties,android。弹出一个窗口,看到底部显示Prj_A库的框架。确保在提到的每个库前面都有一个绿色标记

对于所有带有红色问号的库或每个缺少的库,您需要在显示库的框架中执行以下步骤: 单击“添加”按钮,将弹出一个包含所有候选库的窗口(即导入并在您的工作区中打开)。 如果您没有库,那么您需要先在工作区中导入并打开这些库


然后需要删除每个带有红色问号的库。因此,在显示库的框架中,单击带有红色“?”的库,然后单击删除按钮。然后单击应用。

显示更多的日志,它会更清晰。完整堆栈后跟踪显示更多的日志,它会更清晰。完整堆栈后跟踪我的清单是正确的,完全如您所说。我已经搜索了我的整个项目,没有发现任何问题:/I我的清单是正确的,完全如您所说。我搜索了整个项目,没有发现任何问题:/