Hi I wanted to add holo theme for my app but when I check my splash graphic layout it doesn't seem to work and my app crashes. I want to add holo theme for whole app. Also I want to get rid of the screen that comes just before the splash screen. I have no clue how to do that
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.sachinda.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.Holo">
<activity
android:name="com.sachinda.myfirstapp.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Here is the logcat
06-18 01:16:54.390: I/Process(7860): Sending signal. PID: 7860 SIG: 9
06-18 01:16:55.530: D/HyLog(8955): I : /data/font/config/sfconfig.dat, No such file or directory (2)
06-18 01:16:55.530: D/HyLog(8955): I : /data/font/config/dfactpre.dat, No such file or directory (2)
06-18 01:16:55.530: D/HyLog(8955): I : /data/font/config/sfconfig.dat, No such file or directory (2)
06-18 01:16:55.570: D/AndroidRuntime(8955): Shutting down VM
06-18 01:16:55.570: W/dalvikvm(8955): threadid=1: thread exiting with uncaught exception (group=0x41ae6e48)
06-18 01:16:55.570: E/AndroidRuntime(8955): FATAL EXCEPTION: main
06-18 01:16:55.570: E/AndroidRuntime(8955): Process: com.sachinda.myfirstapp, PID: 8955
06-18 01:16:55.570: E/AndroidRuntime(8955): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.sachinda.myfirstapp/com.sachinda.myfirstapp.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2200)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.ActivityThread.access$800(ActivityThread.java:139)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.os.Handler.dispatchMessage(Handler.java:102)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.os.Looper.loop(Looper.java:136)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.ActivityThread.main(ActivityThread.java:5105)
06-18 01:16:55.570: E/AndroidRuntime(8955): at java.lang.reflect.Method.invokeNative(Native Method)
06-18 01:16:55.570: E/AndroidRuntime(8955): at java.lang.reflect.Method.invoke(Method.java:515)
06-18 01:16:55.570: E/AndroidRuntime(8955): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
06-18 01:16:55.570: E/AndroidRuntime(8955): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:608)
06-18 01:16:55.570: E/AndroidRuntime(8955): at dalvik.system.NativeStart.main(Native Method)
06-18 01:16:55.570: E/AndroidRuntime(8955): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.support.v7.app.ActionBarActivityDelegate.onCreate(ActionBarActivityDelegate.java:111)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.support.v7.app.ActionBarActivityDelegateICS.onCreate(ActionBarActivityDelegateICS.java:58)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.support.v7.app.ActionBarActivity.onCreate(ActionBarActivity.java:98)
06-18 01:16:55.570: E/AndroidRuntime(8955): at com.sachinda.myfirstapp.MainActivity.onCreate(MainActivity.java:24)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.Activity.performCreate(Activity.java:5275)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
06-18 01:16:55.570: E/AndroidRuntime(8955): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)
06-18 01:16:55.570: E/AndroidRuntime(8955): ... 11 more
Your Activity probably extends ActionbarActivity in which case you need to have
Theme.AppCompattheme (or descendant).What you have
Your theme is not from
AppCompat.Have
Or themes dereived from
AppCompat.Quoting docs
When using the Support Library, you must instead use the Theme.AppCompat themes: