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

TypeError: expected dynamic type double but had type string react native #3216

Closed
pickhardt opened this issue Oct 3, 2015 · 11 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@pickhardt
Copy link

This issue seems like #2983 and #2855 however it's slightly different wording.

I've read both of those issues now and can't understand what the fix is. For instance, the fix says to move a folder called ReactAndroid into your project folder and adding it to settings.gradle. But where is this ReactAndroid folder? I don't see it.

I am on React Native 0.11.4 and can't simply use 0.12.0-rc (assuming that would fix it...) because upgrading to -rc breaks other libraries (I get errors like "Peer react-native-fbsdklogin@0.0.4 wants react-native@>=0.8.0")

TypeError: expected dynamic type double but had type string react native

@satya164
Copy link
Contributor

Closing this. Let's reopen if this still happens.

@julesmoretti
Copy link

Getting same error on Android with:

    "react": "16.0.0-alpha.6",
    "react-native": "^0.44.0"

The elements I have tied to my app are:

  StyleSheet,
  View,
  Text,
  PanResponder,
  Animated,
  Dimensions,
  ScrollView,
  TouchableOpacity,

@julesmoretti
Copy link

julesmoretti commented May 2, 2017

Seems to be specific to TouchableOpacity. In my case its a nested one within another TouchableOpacity.

something like:

<TouchableOpacity ...>
   <TouchableOpacity ...>
</TouchableOpacity>

@lgn-lvx3
Copy link

@julesmoretti @satya164

I'm actually getting this error as well, but its for an Animation. Working great on iOS.
image

@kantharia
Copy link

kantharia commented Oct 4, 2017

@hzyio - I am having same issue; works on iOS but giving error on Android. Let me know did you found any solution.

@natakina
Copy link

I have the same error. It happens when I rotate elements and then click on them. One element is the switcher of camera (react-native-camera), another one - go back arrow from react-navigation.

@adesmet
Copy link

adesmet commented Nov 2, 2017

Also experiencing this issue, seems to be on this line:

    StaticTransformConfig transformConfig = new StaticTransformConfig();
    transformConfig.mProperty = property;
    transformConfig.mValue = transformConfigMap.getDouble("value");

When fetching a rotation value, it fails because the rotation value is a string (like '10deg') instead of a double.

Still thinking about a solution that doesn't involve changing react-native itself.

@natakina
Copy link

natakina commented Nov 2, 2017

Wrap the element in a View and rotate this view, not element.

@adesmet
Copy link

adesmet commented Nov 2, 2017

@natakina you are a god among men, it works perfectly.

@cihanbas
Copy link

@natakina yes all Right thank you for perfect answer

@ahmad2smile
Copy link

These sort of incoherent implementations is really annoying when you develop iOS firs then check on Android.

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests