apptentive / apptentive-react-native

Apptentive SDK module for React Native
https://learn.apptentive.com/article-categories/react-native/
BSD 3-Clause "New" or "Revised" License
15 stars 19 forks source link

Crash after updating to v6.1.3 #243

Open RamProg opened 1 year ago

RamProg commented 1 year ago

We were on v6.0.9 and updated to v6.1.3. We started getting a crash on Android:

gc.b requires a value for the com.xxxxxxx.xxxxx:attr/colorSurface attribute to be set in your app theme. You can either set the attribute in your theme or update your theme to inherit from Theme.MaterialComponents (or a descendant).

nc.b in d at line 35 fc.a in c at line 1 gc.b in at line 10 gc.b in at line 1 apptentive.com.android.feedback.enjoyment.EnjoymentDialogFragment in onCreateDialog at line 18

I can see on v6.1.1 release you changed the example app on file example/android/app/src/main/res/values/styles.xml and switched the parent theme from "Theme.AppCompat.DayNight.NoActionBar" to "Theme.MaterialComponents.Light.NoActionBar".

Does this mean our App theme has to inherit from MaterialComponents? We are still on AppCompat and switching might cause unexpected changes to our UI. Should it be enough to just define a value for colorSurface? Is there a chance you can prevent this issue for the next release?

Thank you.

galengeocaching commented 11 months ago

We were running into this error as well, and didn't want to switch to MaterialComponents from AppCompat as well. I ended up declaring a value for colorsurface and then implementing a dark mode file as suggested in the old AppCompat document section "Using your own resources for dark/light"