我正在使用 React-Native-Draggable-View 将滑块添加到我的应用程序中,但是每次触摸滑块时,都会弹出上述错误。在进行故障排除时,它声称与动画/动画视图有关,但我的代码中没有动画视图。我进一步研究了文档,没有提到需要动画视图。我使用了钩子,文档使用类格式,所以我很难确定我在哪里/如何实现它。以下是我到目前为止所拥有的。
import React, { useState, useEffect, Component }from "react";
import {Alert, Dimensions, Platform, StyleSheet, Text, View, Button, TouchableOpacity, TouchableHighlight, SafeAreaView, ScrollView, ActivityIndicator, StatusBar} from "react-native";
import {ListScreen} from './ListScreen
import {CheckScreen} from './CheckScreen'
import Drawer from 'react-native-draggable-view'
function RunningScreen({navigation}) {
...
return(
...
<Drawer
initialDrawerSize={0.3}
finalDrawerHeight={0.5}
//autoDrawerUp={0.5}
renderContainerView={() => (
<ListScreen navigation = {navigation}
/>
)}
renderDrawerView={() => (
<RunningScreen navigation = {navigation} />
)}
renderInitDrawerView={() => (
<View style = {{alignItems: 'center'}}>
<View style={{backgroundColor: '#d3d3d3', height: height*0.01, width: width*0.2, alignItems: 'center'}}>
<StatusBar hidden={false} />
</View>
</View>
)}
/>
)
}
...
export {RunningScreen}