类型错误:未定义不是一个对象评估'_reactNativeReanimated.EasingNode.linear'

问题描述

使用“react-native-floating-label-input”时遇到什么问题:“^1.3.9” 如果您有任何使用“react-native-floating-label-input”的方法,请给我(附上源代码)。 图像 My problem image

我的代码

import React,{useState} from 'react';
import { StyleSheet,TouchableOpacity,View,Image} from 'react-native';
import { useTranslation,} from 'react-i18next'
import { useNavigation } from '@react-navigation/native';
import styles from './style'
import images from '../../theme/images';
import { colors } from 'react-native-elements';
import { FloatingLabelInput } from 'react-native-floating-label-input';
interface SignInScreenProps {

}

const SignInScreen: React.FC<SignInScreenProps> = () => {

  const { t } = useTranslation()
  const navigation = useNavigation()
  const [phone,setPhone] = useState('')

  return (
    <View style={styles.container}>
      <View>
        <Image source={images.logo}
        style={styles.logoStyle}>
        </Image>
      </View>
      <View style={{ flex: 1,backgroundColor: colors.white,borderTopLefTradius: 20,borderTopRighTradius: 20}}>
      <FloatingLabelInput
        label={'label'}
        value={phone}
        rightComponent={(
          <TouchableOpacity style={{ alignContent:'center',justifyContent:'center'}} onPress={()=>{console.log('X clicked')}}></TouchableOpacity>
        )}
        onChangeText={(val) => setPhone(val)}
      />
      </View>
    </View>
  )
}

export default SignInScreen;

解决方法

1.3.5 或更高版本 - react-native-reanimated v2

  • 所有动画现在都使用 react-native-reanimated v2,因为它是 近日正式发布。请关注软件大厦 react-native-reanimated v2 的安装指南: https://docs.swmansion.com/react-native-reanimated/docs/installation

  • OBS.: 如果在 Software Mansion 安装期间指导您的项目 不会构建或构建但在启动时崩溃,请尝试删除 node_modules 文件夹。

  • OBS。 2:如果你不想使用新的 react-native-reanimated v2, 不要升级到这个版本,安装版本 1.3.4 和 react-native-reanimated@1.13.2

https://github.com/Cnilton/react-native-floating-label-input#version-135-or-higher---react-native-reanimated-v2

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...