Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference #23378

Closed
yodaheis opened this issue Feb 11, 2019 · 3 comments
Labels
Bug Resolution: Locked This issue was locked by the bot.

Comments

@yodaheis
Copy link

🐛 Bug Report

Passing animated value interpolation to rotateZ transform property of an Animated view causes this error.

However, rotateX, rotateY seems to work fine. Also, passing a static string value to rotateZ also works as expected.

Expected Behavior

It should transform the same way it does in X-axis and Y-axis rotations.

Code Example

<Animated.View style={[ styles.container, { transform: [ { rotateZ: this._translateX.interpolate({ inputRange: [0, 1], outputRange: ['0.0rad', '1.0rad'] }) } ] } ]} >

Environment

Environment info:
Device: Android 8.0.0
RN version: 0.57.1
OS: macOS 10.13.6
Expo version: 32.0.0

@yodaheis
Copy link
Author

Same error happens when an animated value interpolation value of type number is passed to rotation property instead

@react-native-bot
Copy link
Collaborator

Can you run react-native info and edit your issue to include these results under the Environment section?

If you believe this information is irrelevant to the reported issue, you may write [skip envinfo] under Environment to let us know.

@yodaheis
Copy link
Author

Using rotate property instead of rotateZ works with interpolated values as expected.
�Closing this issue. For someone wanting to animate rotation in the plane of the screen, I suggest you to use rotate instead of rotateZ. I found no reference of this property in the official docs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

3 participants