Error message help please ?

Hi Have just updated to 3.3.6 and the new android 4 mode. Was a bit nervous but it worked first time with a simple getting started sketch. Quite impressed!

But now I wish to run a large project that was working fine with android mode 3, but it now throws this console message after successful build and installation ... it throws as the sketch starts on my phone. Can anyone tell me how to fix this ... what is a Theme.AppCompat theme (or descendant) ?

Many thanks Mark

BUILD SUCCESSFUL in 33s 35 actionable tasks: 35 executed FATAL EXCEPTION: main Process: processing.test.bigchangesandroid_copy3, PID: 405 java.lang.RuntimeException: Unable to start activity ComponentInfo{processing.test.bigchangesandroid_copy3/processing.test.bigchangesandroid_copy3.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2659) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2724) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1473) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6123) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757) Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:355) at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:324) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:294) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:150) at processing.test.bigchangesandroid_copy3.MainActivity.onCreate(MainActivity.java:21) at android.app.Activity.performCreate(Activity.java:6672) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1140) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2612) ... 9 more

Answers

  • @hudson_m400===

    never tried the 4 version; yet your error message is transparent: i suppose that the main activity extends appCompat and that the theme inside the Manifest is not a theme whose parent is appCompat: so change the theme inside your manifest.

  • Thanks @akenaton I will lookat that.

  • Answer ✓

    I will rename the manifest (change the extension as well) and run it. It should recreate the manifest using the newer version. Then you enable all the require permissions for your sketch, if any. Not tested, but I believe I read it in the documentation not long ago.

    Kf

  • Thanks @akenaton and @kfrajer, deleting the manifest before running did the trick. Mark

  • Answer ✓

    @hudson_m4000 Great to hear it did the trick.

    Kf

  • this helped me too but had to redo the permissions

Sign In or Register to comment.