Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Requires AppCompat Theme #12

Open
josmithua opened this issue Mar 27, 2018 · 0 comments
Open

Requires AppCompat Theme #12

josmithua opened this issue Mar 27, 2018 · 0 comments

Comments

@josmithua
Copy link

This library needs your app to use an AppCompat theme.

03-27 11:01:53.902 25851 25851 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mycompany.atwebviewtest/saschpe.android.customtabs.WebViewActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.ActivityThread.-wrap11(Unknown Source:0)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:164)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6494)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:354)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at saschpe.android.customtabs.WebViewActivity.onCreate(SourceFile:43)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:7000)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6991)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
03-27 11:01:53.902 25851 25851 E AndroidRuntime: 	... 9 more

This can be fixed by changing your theme to <application android:theme="@style/Theme.AppCompat[.*]">, but it is not ideal.

Cheers!
Joshua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant