Android studio Theme's

0 Niels van Oijen · January 2, 2015
Hey there guys,

First of all, thanks for the videos you are making for everyone to see Bucky, I've been recommending your videos to my classmates and it makes stuff alot easier for them as wel for me ( I can't explain well ).

The point of me coming here is that I have a problem with the actionbar icon... I can't seem to get a holo theme working when I change the theme in the AndroidManifest.xml to android:theme="@android:style/Theme.Holo.Light" > but this results in a crash when i try to run it.

The reason of wanting to use the holo theme is plainly just about the icon, so if I'd be better off avoiding holo, it's ok.

I tried android:logo="@drawable/ic_launcher" on theother themes but that doesn't wrk either unfortunatly.

Can someone help me getting an icon in the actionbar or getting my holo themes work, please?

Post a Reply

Replies

Oldest  Newest  Rating
0 Niels van Oijen · January 2, 2015
This is my error code btw: 


01-02 14:59:19.422    2190-2190/com.example.shaikun.extotest E/AndroidRuntime? FATAL EXCEPTION: main
    Process: com.example.shaikun.extotest, PID: 2190
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.shaikun.extotest/com.example.shaikun.extotest.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
     Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
            at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:151)
            at android.support.v7.app.ActionBarActivityDelegateBase.onCreate(ActionBarActivityDelegateBase.java:138)
            at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:123)
            at com.example.shaikun.extotest.MainActivity.onCreate(MainActivity.java:13)
            at android.app.Activity.performCreate(Activity.java:5933)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
            at android.app.ActivityThread.access$800(ActivityThread.java:144)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5221)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
  • 1

Java / Android Development

107,196 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator