Frage zu Tab view

  • Antworten:2
  • Bentwortet
Matthias P.
  • Forum-Beiträge: 6

14.01.2012, 22:40:47 via Website

hallo ich schreib grad an meiner ersten app die einen tab view haben soll
nur wenn ich jetzt die starte dann kommt ne fehlermeldung und ich muss die app schließen
aus dem logcat werd ich auch nicht schlau


01-14 21:31:05.824: E/AndroidRuntime(923): FATAL EXCEPTION: main
01-14 21:31:05.824: E/AndroidRuntime(923): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.mpopel.passwordapp/de.mpopel.passwordapp.TabcontrollActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {de.mpopel.passwordapp/de.mpopel.passwordapp.ViewActivity}; have you declared this activity in your AndroidManifest.xml?
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.os.Handler.dispatchMessage(Handler.java:99)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.os.Looper.loop(Looper.java:123)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread.main(ActivityThread.java:3683)
01-14 21:31:05.824: E/AndroidRuntime(923): at java.lang.reflect.Method.invokeNative(Native Method)
01-14 21:31:05.824: E/AndroidRuntime(923): at java.lang.reflect.Method.invoke(Method.java:507)
01-14 21:31:05.824: E/AndroidRuntime(923): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
01-14 21:31:05.824: E/AndroidRuntime(923): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
01-14 21:31:05.824: E/AndroidRuntime(923): at dalvik.system.NativeStart.main(Native Method)
01-14 21:31:05.824: E/AndroidRuntime(923): Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {de.mpopel.passwordapp/de.mpopel.passwordapp.ViewActivity}; have you declared this activity in your AndroidManifest.xml?
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1405)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread.resolveActivityInfo(ActivityThread.java:1457)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:277)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:654)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.widget.TabHost.setCurrentTab(TabHost.java:326)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.widget.TabHost.addTab(TabHost.java:216)
01-14 21:31:05.824: E/AndroidRuntime(923): at de.mpopel.passwordapp.TabcontrollActivity.onCreate(TabcontrollActivity.java:25)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
01-14 21:31:05.824: E/AndroidRuntime(923): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
01-14 21:31:05.824: E/AndroidRuntime(923): ... 11 more

nur um eins auszuschließen in der manifest stet die activity drinnen

1<activity
2 android:name=".TabcontrollActivity"
3 android:label="@string/app_name"
4 android:theme="@android:style/Theme.NoTitleBar">
5 <intent-filter>
6 <action android:name="android.intent.action.MAIN" />
7
8 <category android:name="android.intent.category.LAUNCHER" />
9 </intent-filter>
10 </activity>

Antworten
Felix
  • Forum-Beiträge: 259

14.01.2012, 22:47:56 via Website

Tach!

aus dem logcat werd ich auch nicht schlau

Dabei steht das doch im Klartext drin.

01-14 21:31:05.824: E/AndroidRuntime(923): java.lang.RuntimeException: Unable to start activity ComponentInfo{de.mpopel.passwordapp/de.mpopel.passwordapp.TabcontrollActivity}: android.content.ActivityNotFoundException: Unable to find explicit activity class {de.mpopel.passwordapp/de.mpopel.passwordapp.ViewActivity}; have you declared this activity in your AndroidManifest.xml?

nur um eins auszuschließen in der manifest stet die activity drinnen
1<activity android:name=".TabcontrollActivity"

Und die, die nicht gefunden wird, also die ViewActivity, die steht auch drin? Alles was per Intent aufgerufen wird, muss mindestens einen einfachen <activity>-Eintrag haben.


Felix

Antworten
Matthias P.
  • Forum-Beiträge: 6

14.01.2012, 23:05:23 via Website

danke hat funktioniert
hab nicht gewusst dass man alle in die manifest müssen

Antworten