Switch of android will cause a NullPointerException #16000
Labels
Good first issue
Interested in collaborating? Take a stab at fixing one of these issues.
Help Wanted
Issues ideal for external contributors.
Resolution: Locked
This issue was locked by the bot.
Is this a bug report?
(Yes)
Have you read the Contributing Guidelines?
(No)
Environment
react-native -v
: 2.0.1node -v
: 6.11.1npm -v
: 5.3.0yarn --version
: 0.27.5Then, specify:
Target Platform: Android
Development Operating System: macOS
Build tools: Android Studio
Steps to Reproduce
(Write your steps here:)
com.android.support:appcompat-v7:24.2.1
<Switch />
Expected Behavior
display a
Switch
componentActual Behavior
Reason
from this picture,
line 59
andline 102
create instance of ReactSwitch;the difference:
setShowText(false)
, it will get the error of the red box, while callingmeasure
.setShowText(false)
, that's right.how to fix:
follow
line 59
, insert a new linereactSwitch.setShowText(false);
if using
com.android.support:appcompat-v7:23.0.1
, it will not get this error; but i think this error can be avoided without downgradingappcompat-v7
library. Sorry for my poor english, thank you!The text was updated successfully, but these errors were encountered: