Sunday, 15 March 2015

android - Holo theme not working on splash screen...App crashes -



android - Holo theme not working on splash screen...App crashes -

hi wanted add together holo theme app when check splash graphic layout doesn't seem work , app crashes. want add together holo theme whole app. want rid of screen comes before splash screen. have no clue how 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 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): : /data/font/config/sfconfig.dat, no such file or directory (2) 06-18 01:16:55.530: d/hylog(8955): : /data/font/config/dfactpre.dat, no such file or directory (2) 06-18 01:16:55.530: d/hylog(8955): : /data/font/config/sfconfig.dat, no such file or directory (2) 06-18 01:16:55.570: d/androidruntime(8955): shutting downwards vm 06-18 01:16:55.570: w/dalvikvm(8955): threadid=1: thread exiting 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 start activity componentinfo{com.sachinda.myfirstapp/com.sachinda.myfirstapp.mainactivity}: java.lang.illegalstateexception: need utilize theme.appcompat theme (or descendant) activity. 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activitythread.performlaunchactivity(activitythread.java:2200) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activitythread.handlelaunchactivity(activitythread.java:2250) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activitythread.access$800(activitythread.java:139) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activitythread$h.handlemessage(activitythread.java:1200) 06-18 01:16:55.570: e/androidruntime(8955): @ android.os.handler.dispatchmessage(handler.java:102) 06-18 01:16:55.570: e/androidruntime(8955): @ android.os.looper.loop(looper.java:136) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activitythread.main(activitythread.java:5105) 06-18 01:16:55.570: e/androidruntime(8955): @ java.lang.reflect.method.invokenative(native method) 06-18 01:16:55.570: e/androidruntime(8955): @ java.lang.reflect.method.invoke(method.java:515) 06-18 01:16:55.570: e/androidruntime(8955): @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:792) 06-18 01:16:55.570: e/androidruntime(8955): @ com.android.internal.os.zygoteinit.main(zygoteinit.java:608) 06-18 01:16:55.570: e/androidruntime(8955): @ dalvik.system.nativestart.main(native method) 06-18 01:16:55.570: e/androidruntime(8955): caused by: java.lang.illegalstateexception: need utilize theme.appcompat theme (or descendant) activity. 06-18 01:16:55.570: e/androidruntime(8955): @ android.support.v7.app.actionbaractivitydelegate.oncreate(actionbaractivitydelegate.java:111) 06-18 01:16:55.570: e/androidruntime(8955): @ android.support.v7.app.actionbaractivitydelegateics.oncreate(actionbaractivitydelegateics.java:58) 06-18 01:16:55.570: e/androidruntime(8955): @ android.support.v7.app.actionbaractivity.oncreate(actionbaractivity.java:98) 06-18 01:16:55.570: e/androidruntime(8955): @ com.sachinda.myfirstapp.mainactivity.oncreate(mainactivity.java:24) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activity.performcreate(activity.java:5275) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1087) 06-18 01:16:55.570: e/androidruntime(8955): @ android.app.activitythread.performlaunchactivity(activitythread.java:2164) 06-18 01:16:55.570: e/androidruntime(8955): ... 11 more

your activity extends actionbaractivity in case need have theme.appcompat theme (or descendant).

what have

android:theme="@android:style/theme.holo">

your theme not appcompat.

have

android:theme="@style/theme.appcompat

or themes dereived appcompat.

quoting docs

when using back upwards library, must instead utilize theme.appcompat themes:

theme.appcompat "dark" theme. theme.appcompat.light "light" theme. theme.appcompat.light.darkactionbar lite theme dark action bar.

android splash-screen android-holo-everywhere

No comments:

Post a Comment