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

Application crashes when trying to launch it on AndroidTV #53

Closed
doneitas opened this issue May 10, 2019 · 2 comments
Closed

Application crashes when trying to launch it on AndroidTV #53

doneitas opened this issue May 10, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@doneitas
Copy link
Contributor

image

05-09 15:47:14.089 15050 15050 E AndroidRuntime: FATAL EXCEPTION: main 05-09 15:47:14.089 15050 15050 E AndroidRuntime: Process: reactnativevanilla.helloworld.debug, PID: 15050 05-09 15:47:14.089 15050 15050 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{reactnativevanilla.helloworld.debug/reactnativevanilla.helloworld.debug.MainActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2691) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2752) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1461) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6120) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity. 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:555) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:518) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.support.v7.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:457) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:145) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.loadApp(ReactActivityDelegate.java:89) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at com.facebook.react.ReactActivityDelegate.onCreate(ReactActivityDelegate.java:75) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at com.facebook.react.ReactActivity.onCreate(ReactActivity.java:52) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6664) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2644) 05-09 15:47:14.089 15050 15050 E AndroidRuntime: ... 9 more

@hosek
Copy link
Collaborator

hosek commented May 13, 2019

As a quick fix, you can change the AppTheme to the AppCompat one
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar" />

@pavjacko pavjacko self-assigned this May 23, 2019
@pavjacko pavjacko added the bug Something isn't working label May 23, 2019
@pavjacko
Copy link
Member

@doneitas now properly fixed in https://github.com/pavjacko/renative/releases/tag/0.21.6
@hosek thx for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants