Transform::rotate on Android: "Value for value cannot be cast from String to Double"
See original GitHub issueEnvironment
React Native Environment Info:
System:
OS: macOS 10.14.2
CPU: (8) x64 Intel(R) Core(TM) i7-7920HQ CPU @ 3.10GHz
Memory: 381.37 MB / 16.00 GB
Shell: 5.0.2 - /usr/local/bin/bash
Binaries:
Node: 10.11.0 - /usr/local/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
Android SDK:
API Levels: 23, 24, 25, 26, 27, 28
Build Tools: 23.0.1, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3, 28.0.0, 28.0.3
System Images: android-27 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5199772
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmPackages:
react: 16.5.2 => 16.5.2
react-native: 0.57.3 => 0.57.3
npmGlobalPackages:
create-react-native-app: 1.0.0
react-native-cli: 2.0.1
react-native-git-upgrade: 0.2.7
Description
The following code works well on iOS, but not on Android:
const s = StyleSheet.create({
curvedLineLeft: {
transform: [{ rotate: '90deg' }, { scale: 1.6 }],
position: 'absolute',
left: -(width / 35),
top: 31 + 91
},
// ....
It produces "Value for value cannot be cast from String to Double"
Even if i pass a double for rotate like `rotate: 3.14196/4` it complains that it needs a string and not a double.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:10
Top Results From Across the Web
value for message cannot be cast from readablenativearray to ...
It produces "Value for value cannot be cast from String to Double" Even if i pass a double for rotate like `rotate: 3.14196/4`...
Read more >Converting String to Double in Android - Stack Overflow
I would do it this way: try { txtProt = (EditText) findViewById(R.id.Protein); // Same p = txtProt.getText().
Read more >Layouts and binding expressions | Android Developers
If the expression cannot be evaluated due to null objects, data binding returns the default value for that type. For example, null for...
Read more >Rotate (JavaFX 8) - Oracle Help Center
Transforms the relative magnitude vector by this transform. double, getAngle(). Gets the value of the property angle. Point3D ...
Read more >Convert Character Array to String in Java - GeeksforGeeks
This method generally converts int, float, double, char, boolean, and even object to a string. Here we will achieve the goal by converting...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In this issue fix with changing
TouchableOpacity
toTouchableHighlight
has helped me.same issue.
"react": "16.6.1", "react-native": "0.57.7"