- Forum-Beiträge: 1.525
04.11.2013, 22:46:37 via Website
04.11.2013 22:46:37 via Website
Seit Tagen suche ich mich bei Google dumm und doof .
Habe das Problem das ich meine Theme nicht mehr z.B zu
Starte ich meine App, stürzt sie einfach ab.
Fehlermeldung ist von Android Studio:
2 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapplication/com.example.myapplication.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
3 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2092)
4 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)
5 at android.app.ActivityThread.access$700(ActivityThread.java:134)
6 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)
7 at android.os.Handler.dispatchMessage(Handler.java:99)
8 at android.os.Looper.loop(Looper.java:137)
9 at android.app.ActivityThread.main(ActivityThread.java:4867)
10 at java.lang.reflect.Method.invokeNative(Native Method)
11 at java.lang.reflect.Method.invoke(Method.java:511)
12 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
13 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
14 at dalvik.system.NativeStart.main(Native Method)
15 Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
16 at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111)
17 at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
18 at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
19 at com.example.myapplication.MainActivity.onCreate(MainActivity.java:19)
20 at android.app.Activity.performCreate(Activity.java:5047)
21 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
22 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2056)
23 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2117)
24 at android.app.ActivityThread.access$700(ActivityThread.java:134)
25 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1218)
26 at android.os.Handler.dispatchMessage(Handler.java:99)
27 at android.os.Looper.loop(Looper.java:137)
28 at android.app.ActivityThread.main(ActivityThread.java:4867)
29 at java.lang.reflect.Method.invokeNative(Native Method)
30 at java.lang.reflect.Method.invoke(Method.java:511)
31 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
32 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
33 at dalvik.system.NativeStart.main(Native Method)
Komischerweise hatte ich das vor paar Wochen noch nicht.
Bei meinen "älteren" App´s klappt das wunderbar.
Warum ich das Theme ändern will? Z.B für die NumberPicker.
Da ändert sich der Style z.B dann.
Ich hoffe einer kann mir helfen und sagen wo das Problem liegt.
Finde einfach keine passende Antwort.
LG
Empfohlener redaktioneller Inhalt
Mit Deiner Zustimmung wird hier ein externer Inhalt geladen.
Mit Klick auf den oben stehenden Button erklärst Du Dich damit einverstanden, dass Dir externe Inhalte angezeigt werden dürfen. Dabei können personenbezogene Daten an Drittanbieter übermittelt werden. Mehr Infos dazu findest Du in unserer Datenschutzerklärung.