似乎无法在React Native上使用require或uri显示图像!我在做什么错?

问题描述 投票:0回答:1

从'react'导入React;导入{StyleSheet,文本,视图,TouchableOpacity,按钮图片}来自“ react-native”;

导出默认类MentePair扩展了React.Component {render(){返回(

        </View>

    )
}

}我什至尝试导入图像并要求方法。它不起作用!

android reactjs react-native react-native-android
1个回答
0
投票

您的代码似乎没有使用图像标签,您可以访问官方文档https://reactnative.dev/docs/image例:

© www.soinside.com 2019 - 2024. All rights reserved.