Closed
Description
- Review the documentation: https://facebook.github.io/react-native
- Search for existing issues: https://github.com/facebook/react-native/issues
- Use the latest React Native release: https://github.com/facebook/react-native/releases
Environment
React Native Environment Info:
System:
OS: macOS 10.14
CPU: (4) x64 Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
Memory: 312.13 MB / 8.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.11.4 - /usr/local/bin/node
npm: 5.6.0 - /usr/local/bin/npm
SDKs:
iOS SDK:
Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
Android SDK:
API Levels: 23, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.2, 26.0.1, 26.0.2, 26.0.3, 27.0.2, 27.0.3, 28.0.2, 28.0.3
System Images: android-18 | Google APIs Intel x86 Atom, android-19 | Google APIs Intel x86 Atom, android-25 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.0/10A255 - /usr/bin/xcodebuild
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.57.8 => 0.57.8
npmGlobalPackages:
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
Crash on an Android 4.4.2 device when checking CheckBox. Reproducible on an emulator (android-19 | Google APIs Intel x86 Atom).
Reproducible Demo
https://github.com/guliash/rn-check-box-crash-demo
Just check the CheckBox.
StackTrace
01-07 00:21:33.208 3973-3973/com.checkboxcrash E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.checkboxcrash, PID: 3973
java.lang.ClassCastException: android.support.v7.widget.TintContextWrapper cannot be cast to com.facebook.react.bridge.ReactContext
at com.facebook.react.views.checkbox.ReactCheckBoxManager$1.onCheckedChanged(ReactCheckBoxManager.java:27)
at android.widget.CompoundButton.setChecked(CompoundButton.java:127)
at com.facebook.react.views.checkbox.ReactCheckBox.setChecked(ReactCheckBox.java:26)
at android.widget.CompoundButton.toggle(CompoundButton.java:87)
at android.widget.CompoundButton.performClick(CompoundButton.java:99)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)