我是React Native的新手,你能帮我吗?我刚刚安装了react-native- sensors (Yarn add --保存react-native-sensors),然后我导入了我的项目(从“react-native -sensors”导入{ Accelerometer };),但我收到了这条信息:"Native Modules for sensors not available. Did -native link run?“
我运行了命令"react-native link react-native-sensors",但错误仍然存在=(
我使用的是"
我已经在android上构建了一个react本地应用程序,一切都运行良好,fine.....it通过android和vscode终端构建得非常完美。我现在第一次尝试使用命令npx react-native run-ios (来自vscode上的终端)在ios上构建
我收到了一个错误Expected [\n\r] but end of input found.,我猜它可能是podfile......Below中的什么东西是我的podfile,我的react原生版本是0.67.0
require_relative '../node_modules/react-native/scripts/
我正在尝试使用axios.create()在axios post请求上设置Authorization。我将其放在一个文件中,当我尝试将该函数导入到我的React Native组件中时,我得到了以下错误:
axiosWithAuth.default().post is not a function
下面是我的函数代码:
import axios from 'axios';
import {AsyncStorage} from 'react-native';
// import AsyncStorage from '@react-native-communi
当键盘在InputText上打开时,我得到了这个错误currentlyFocusedField is deprecated and will be removed in a future release. Use currentlyFocusedInput有人遇到过同样的问题吗? 此错误仅出现在iOS设备上。 我使用了以下依赖关系: "@react-navigation/bottom-tabs": "^5.11.2",
"@react-navigation/native": "^5.8.10",
"@react-navi
这是我当前的Podfile: # Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'atom' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'Firebase/Core', '~> 5
按照指南安装react-native-unimodules时,执行pod install时会出现以下错误
[!] Invalid `Podfile` file: undefined method `use_unimodules!' for #<Pod::Podfile:0x00007ff24708eaa8>
Did you mean? use_native_modules!.
# from /Users/Shared/workspace/App/ios/Podfile:7
# -------------------------------------------
我运行了react-native-git-upgrade,这样以后我就可以运行react-native run-android在我的设备上构建我的应用程序,但出现了一条错误消息。 错误信息为: Error: react-native version in "package.json" (https://github.com/expo/react-native/archive/sdk-31.0.0.tar.gz) doesn't match the installed version in "node_modules" (0.57.1). 我再次尝试运行
当我试图访问我正在使用<MapView>的屏幕(使用react-native-navigation)时,得到以下错误;
项目构建阶段顺利通过,所有其他屏幕和功能都工作正常。同样的屏幕(MapView屏幕)在安卓系统上运行良好。我没有使用cocoa-pods,只是使用了manual linking。
遗憾的是,在完成react-native-maps实现后,IOS上出现以下错误:
错误:
NO + [RCTConvert MKCoordinateRegion:] function found.
我的Mac:
MAC: macOS High Sierra v 10.13.6,
我的Xc
我得到了这个错误
RCTFatalException: Unhandled JS Exception: No dimension set for key windowmh_execute_header Unhandled JS Exception: No dimension set for key window, stack: value@75:505
在生产中。我认为这是RN的一个问题:
该线程中的所有解决方案看起来都是针对开发环境的。有没有办法在生产环境中修复这个问题(当然是在上传新版本之后)?
"dependencies": {
"@yfuks/rea
在我的react本机项目中,我没有"react-native-reanimated",但是当我重新构建我的项目时,我得到了以下错误:"Project "react-native-reanimated" was not found in the root project
因此,当我安装react-native-reanimated时,会出现一个NDK安装错误,但是当我安装ndk并从项目中获取apk时,应用程序不会打开并崩溃。
因此,我卸载了react-native-reanimated、ndk和cmake,但是再次得到了错误"project
问题描述
我通过npx react-native link react-native-navigation (并在andoid/build.gradle中修改minSdkVersion )安装库。
当我运行npx react-native run-android时,应用程序已经构建并且工作正常,尽管我在终端中得到了以下错误:
error React Native CLI uses autolinking for native dependencies, but the following modules are linked manually:
- react-native-naviga