간단한 탭뷰입니다.

이거 참 어디가 문제인지 파악이 안되서요..

 

<TapActivity.java>

 

package com.dufh.dufh2;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TabHost;

public class TapActivity extends Activity {
 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);

  TabHost th = (TabHost) findViewById(R.id.tabhostUi);
  th.setup();

  TabHost.TabSpec spec = th.newTabSpec("tab1");
  spec.setContent(R.id.tabs1);
  spec.setIndicator("Tab1");
  th.addTab(spec);

  spec = th.newTabSpec("tab2");
  spec.setContent(R.id.tabs2);
  spec.setIndicator("Tab2");
  th.addTab(spec);

  th.setCurrentTab(0);

 }
}


<main.xml>

 

<?xml version="1.0" encoding="utf-8"?>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tabhostUi"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical" >

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" >

            <EditText
                android:id="@+id/tabs1"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:hint="Tab1" />

            <TextView
                android:id="@+id/tabs2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Tab2" >
            </TextView>
        </FrameLayout>
    </LinearLayout>

</TabHost>

 

소스는 이거궁..

 

 

로그캣은 이렇게..

 

 

10-22 15:12:12.001: E/AndroidRuntime(333): FATAL EXCEPTION: main
10-22 15:12:12.001: E/AndroidRuntime(333): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.dufh.dufh2/com.dufh.dufh2.MainActivity}: java.lang.ClassNotFoundException: com.dufh.dufh2.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.dufh.dufh2-2.apk]
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.os.Handler.dispatchMessage(Handler.java:99)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.os.Looper.loop(Looper.java:123)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.ActivityThread.main(ActivityThread.java:3683)
10-22 15:12:12.001: E/AndroidRuntime(333): at java.lang.reflect.Method.invokeNative(Native Method)
10-22 15:12:12.001: E/AndroidRuntime(333): at java.lang.reflect.Method.invoke(Method.java:507)
10-22 15:12:12.001: E/AndroidRuntime(333): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
10-22 15:12:12.001: E/AndroidRuntime(333): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
10-22 15:12:12.001: E/AndroidRuntime(333): at dalvik.system.NativeStart.main(Native Method)
10-22 15:12:12.001: E/AndroidRuntime(333): Caused by: java.lang.ClassNotFoundException: com.dufh.dufh2.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.dufh.dufh2-2.apk]
10-22 15:12:12.001: E/AndroidRuntime(333): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
10-22 15:12:12.001: E/AndroidRuntime(333): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
10-22 15:12:12.001: E/AndroidRuntime(333): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
10-22 15:12:12.001: E/AndroidRuntime(333): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
10-22 15:12:12.001: E/AndroidRuntime(333): ... 11 more

 

 

avd로 실행하니 계속 오류가 뜨네요.. 왜이런것이죠..