我最近从 SDK 43 迁移到了 Expo SDK 45,并且从经典版本升级到了 EAS CLI,并且我拥有托管工作流程。当我使用命令eas build --profile preview --platform android创建 android 版本时。它成功创建了版本,但在启动画面时崩溃,没有任何堆栈跟踪。当我使用开发客户端或 Expo GO 测试版本时,没有任何错误或警告。在这里我分享我的
2022-12-13
我是React和React native的新手,正在尝试从 API检索数据,然后渲染它,但似乎遇到了问题。我可以从API中获取数据,但是当我尝试渲染它时,我收到了各种错误。本质上,我所做的就是渲染从 API 返回的照片。应该很简单吧?如果有人能为我指明正确的方向,我将不胜感激。我收到的错误如下:undefined is not an object (evaluating 'this.props.p
2015-12-27
我首先使用 coincap api 获取大约 1500 多种加密货币的数据,然后使用 Web-socket 更新加密货币的更新值。我在这里使用 redux 来管理我的状态在我的componentDidMount()中,我调用了一个redux 动作fetchCoin来获取硬币的价值componentDidMount() {this.props.fetchCoin()}然后在return中我做了这样的
2018-08-25
当我从放置它的地方删除我专门创建的组件菜单时,我没有收到错误,但当我的组件在那里时,我收到错误。感谢您的评论。import Menu from './Navigator'import { FontAwesomeIcon } from '@fortawesome/react-native-fontawesome';import { faBars } from '@fortawesome/free-s
2021-02-15
所以今天我想创建考试应用程序并显示答案(以及用户标记答案的位置)。所以我使用了库作为单选按钮。到目前为止我的代码(部分)- <FlatList// key={stepRef}data={questions}renderItem={(data) => {let i = data && data.index;let questionStyle = {};if (i
2021-07-21
我遇到了 react-native 按钮的问题。当我在新初始化的项目中测试它们时,一切都正常。但是当我想将它们实现到我的项目中时,它不起作用并且给我一个错误...这是我的项目的一部分(不重要的内容被遗漏了):import React from 'react';import {Platform,StyleSheet,TouchableOpacity,View,Image,Text,Button,Al
2017-01-16
我正在尝试在 React Native 中创建一个带有按钮的简单应用,但到目前为止,每次运行代码时,都会出现错误,提示“找不到变量:按钮”。我希望标题位于顶部(已完成),按钮位于屏幕中央,触摸时会发出警报。我浏览了几个在线教程,但找不到解决方案。这是我的代码:/*** Sample React Native App* https://github.com/facebook/react-native
2017-10-13
我想将汽车图像放在背景图像上,仅此而已。import React, { Component } from 'react';import {...Animated,ImageBackground} from 'react-native';export default class App extends Component {render() {return (<ImageBackground ima
2017-11-20
在编写一个简单的 react-native 程序时,我无法让<Button>组件工作。我在react-native run-android之后总是收到的错误是java.lang.String cannot be cast tocom.facebook.react.uimanager.AccessibilityDelegateUtil$AccessibilityRole当我省略按钮时,一切都正常,我
2018-10-12
<TouchableOpacity style={styles.box}><ImageBackgroundsource={require('../images/pic.png')}><Icontype='foundation'name='dump'style={styles.icon}/></ImageBackground><Text style={styles.text}>H
2019-11-30
您能帮我解决 React Native Elements 库中按钮边框半径的问题吗?我正在为按钮添加边框半径,但其不透明度仍然是矩形,我不明白为什么。https://github.com/react-native-elements/react-native-elements/issues/2324
2020-04-23
我在 React Native 项目中使用styled-components时出现此错误。TypeError: undefined is not a function (near '..._styledComponents.default.button...')这是我的代码;import styled from "styled-components";const Buttonn = styled.
2021-09-17
我之前见过这个问题,但是我在 Stack Overflow 和其他地方找到的解决方案都无法解决我的情况。单击“信息”按钮时出现此错误undefined is not an object evaluating (_this.props.navigation)我不确定为什么,但我知道这与 ChatScreen 类中的此行有关:const { navigate } = this.props.naviga
2017-05-16
我已按照教程https://reactnavigation.org/docs/intro/中的说明实现了 React Navigation 示例,并且运行良好。<ButtononPress={() => navigate('Chat')}title="Chat with Lucy"/>我不想直接在 onPress 中调用 navigation,而是想在单独的函数 btnToChat 中调用它。我尝
2017-06-14
以下代码有效,单击后会带我进入 loginStack Stack Navigator<TouchableWithoutFeedbackonPress={ this.navigateToScreen('loginStack') }><View><Text>Click Me</Text></View></TouchableWithoutFeedback>我的 NavigateToScreen 函数如下
2017-12-13