gpt4 book ai didi

android - 启动时找不到 FC 源

转载 作者:行者123 更新时间:2023-11-30 03:42:04 25 4
gpt4 key购买 nike

我有一个正在开发的应用程序,到目前为止只编辑了 xml,当我尝试调试时我得到了这个:

source not found

调试:

Thread [<1> main] (Suspended (exception RuntimeException))  
ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2306
ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 2356
ActivityThread.access$600(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 150
ActivityThread$H.handleMessage(Message) line: 1244
ActivityThread$H(Handler).dispatchMessage(Message) line: 99
Looper.loop() line: 137
ActivityThread.main(String[]) line: 5195
Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]
Method.invoke(Object, Object...) line: 511
ZygoteInit$MethodAndArgsCaller.run() line: 795
ZygoteInit.main(String[]) line: 562
NativeStart.main(String[]) line: not available [native method]

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=".NowPlaying" >

<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_height="wrap_content"
android:layout_below="@id/bplay"
android:layout_marginTop="10dp"
android:progressDrawable="@drawable/progress"
android:thumb="@drawable/seeker" />

<TextView
android:id="@+id/tvtime"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/songProgressBar"
android:gravity="right"
android:text="@string/time"
android:textSize="20sp" />
</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>

如果需要, list :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.timmo.tampmusicplayer"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.timmo.tampmusicplayer.NowPlaying"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

</manifest>

我一直收到这个错误。我试过重新安装 sdk 和 adt/eclipse,但什么也没有。我根本不明白是什么导致了这个问题。这是使用 android 工具创建的,我什至无法看到我的第一个设计......

最佳答案

“找不到来源”不是错误。它是 eclipse 的一部分,与您的代码无关。看起来你点击了调试的第一行,你被带到了这里。所有“未找到源”表示 Eclipse 无法找到 ActivityThread.java 的源。如果您的应用程序未启动,真正的错误将出现在 Logcat 中。

关于android - 启动时找不到 FC 源,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15578759/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com