0

i have this error every time i run my application , anyone know why ?

and this is my manifest file

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.temp.pk"
android:versionCode="1"
android:versionName="1.0" >

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

<uses-permission android:name="android.permission.INTERNET" />
<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name" >
    <activity
        android:name=".ui.TabsActivity"
        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>

04-14 14:35:36.133: E/AndroidRuntime(516): FATAL EXCEPTION: main
04-14 14:35:36.133: E/AndroidRuntime(516): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.temp.pk/com.temp.pk.ui.TabsActivity}: java.lang.ClassNotFoundException: com.temp.pk.ui.TabsActivity in loader dalvik.system.PathClassLoader[/data/app/com.temp.pk-1.apk]
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.os.Looper.loop(Looper.java:123)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.ActivityThread.main(ActivityThread.java:3683)
04-14 14:35:36.133: E/AndroidRuntime(516):  at java.lang.reflect.Method.invokeNative(Native Method)
04-14 14:35:36.133: E/AndroidRuntime(516):  at java.lang.reflect.Method.invoke(Method.java:507)
04-14 14:35:36.133: E/AndroidRuntime(516):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-14 14:35:36.133: E/AndroidRuntime(516):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-14 14:35:36.133: E/AndroidRuntime(516):  at dalvik.system.NativeStart.main(Native Method)
04-14 14:35:36.133: E/AndroidRuntime(516): Caused by: java.lang.ClassNotFoundException: com.temp.pk.ui.TabsActivity in loader dalvik.system.PathClassLoader[/data/app/com.temp.pk-1.apk]
04-14 14:35:36.133: E/AndroidRuntime(516):  at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-14 14:35:36.133: E/AndroidRuntime(516):  at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-14 14:35:36.133: E/AndroidRuntime(516):  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
04-14 14:35:36.133: E/AndroidRuntime(516):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
04-14 14:35:36.133: E/AndroidRuntime(516):  ... 11 more
4

2 回答 2

0

利用

<activity
            android:name=".TabsActivity"
            android:label="@string/app_name" >

编辑:或者你可以使用:

   <activity 
      android:name="FULL_PACKAGE_NAME.TabsActivity"
      android:label="@string/app_name" >

代替

<activity
            android:name=".ui.TabsActivity"
            android:label="@string/app_name" >
于 2012-05-11T16:47:44.903 回答
0

你没有显示任何代码,所以我在这里猜测一下。也许应该是android:name=".TabsActivity"

于 2012-05-11T16:49:42.520 回答