2013-03-22 3 views
1

У меня есть приложение в разработке и только редактировал XML до сих пор, и им получать это, когда я пытаюсь отлаживать:FC Источник не найден при запуске

source not found

Debug:

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> 

манифеста при необходимости:

<?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> 

Я продолжаю получать эту ошибку. Ive попытался переустановить sdk и adt/eclipse и ничего. Я не понимаю, что вызывает эту проблему вообще. Это было создано с помощью инструментов Android, и я не могу даже увидеть свой первый дизайн ...

ответ

1

«Источник не найден» не является ошибкой. Это часть затмения и не имеет никакого отношения к вашему коду. Похоже, вы нажали на верхнюю строку отладки, и вас сюда взяли. Все «Источник не найден» указывает, что Eclipse не может найти источник ActivityThread.java. В Logcat появится реальная ошибка, если ваше приложение не запускается.

+0

В основном это просто говорит, что источника нет. – WarrenFaith

Смежные вопросы