0
01-01 18:37:09.121: D/jdwp(25092): sendBufferedRequest : len=0x43
01-01 18:37:09.124: W/asset(25092): AssetManager-->addDefaultAssets CIP path not exsit!
01-01 18:37:09.162: D/AndroidRuntime(25092): Shutting down VM
01-01 18:37:09.162: W/dalvikvm(25092): threadid=1: thread exiting with uncaught exception (group=0x41ec99a8)
01-01 18:37:09.170: E/AndroidRuntime(25092): FATAL EXCEPTION: main
01-01 18:37:09.170: E/AndroidRuntime(25092): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.javac101/com.example.javac101.MainActivity}: android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2343)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.ActivityThread.access$600(ActivityThread.java:162)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.os.Handler.dispatchMessage(Handler.java:107)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.os.Looper.loop(Looper.java:194)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.ActivityThread.main(ActivityThread.java:5371)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at java.lang.reflect.Method.invokeNative(Native Method)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at java.lang.reflect.Method.invoke(Method.java:525)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at dalvik.system.NativeStart.main(Native Method)
01-01 18:37:09.170: E/AndroidRuntime(25092): Caused by: android.util.AndroidRuntimeException: You cannot combine custom titles with other title features
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.android.internal.policy.impl.PhoneWindow.requestFeature(PhoneWindow.java:252)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2670)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2915)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:277)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.Activity.setContentView(Activity.java:1881)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at com.example.javac101.MainActivity.onCreate(MainActivity.java:69)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.Activity.performCreate(Activity.java:5122)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1081)
01-01 18:37:09.170: E/AndroidRuntime(25092):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2307)
01-01 18:37:09.170: E/AndroidRuntime(25092):    ... 11 more

We created an android application using eclipse in the version of Froyo until jelly bean 4.2.0 the problem is, we want to run the application in Jelly bean 4.2.2 ..I tried upgrading the minSdkVersion and the targetSdkVersion in eclpise, still the application crashes and that was the output above when I tried it in 4.2.2 my API .I also go to Windows>preferences>android the platform has already 4.2.2

Roman C
  • 49,761
  • 33
  • 66
  • 176

2 Answers2

1

Just add this line android:theme="@android:style/Theme" with your MainActivity in AndroidManifest.xml as follows,

<activity
        android:name=".MainActivity"
        android:theme="@android:style/Theme" >
</activity>
Vigbyor
  • 2,568
  • 4
  • 21
  • 35
0

There is some issue with the layout XML in

com.example.javac101.MainActivity.onCreate() at line#69 setContentView()

You must be trying something like this:

getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.<your layout>);

But in latest version of android devices use Action bar instead of title.

Tabrej Khan
  • 894
  • 6
  • 15