Is this a bug report?
(Yes)
(No)
Environment
react-native -v: 2.0.1
node -v: 6.11.1
npm -v: 5.3.0
yarn --version: 0.27.5
Then, specify:
Steps to Reproduce
(Write your steps here:)
- using library
com.android.support:appcompat-v7:24.2.1
- using component
<Switch />
Expected Behavior
display a Switch component
Actual Behavior

Reason

from this picture, line 59 and line 102 create instance of ReactSwitch;
the difference:
- the first one hasn't called
setShowText(false), it will get the error of the red box, while calling measure.
- the second one has called
setShowText(false), that's right.
how to fix:
follow line 59, insert a new line reactSwitch.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 downgrading appcompat-v7 library. Sorry for my poor english, thank you!
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
SwitchcomponentActual Behavior
Reason
from this picture,
line 59andline 102create 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-v7library. Sorry for my poor english, thank you!