我正在致力于一个反应本地项目与博览会和纱线,并需要安装一个新的依赖,以获得设备制造商(它是反应-本机设备-信息,如果你想知道)。我成功地安装了它,并在我的代码中实现了它,但是在用expo go打开应用程序时,我看到了一条错误消息。
@React-native-community/react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue follow these steps: *useless steps*
在github中,我发现了很多问题来解决这个问题(开发人员回答这个问题不是他的问题,因为它
我试图在从另一个系统导入的VS代码中运行一个react-native项目,但我得到了以下错误,如下所示 error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
env: sh\r: No such fi
有人能解释一下为什么吊舱安装拆卸反应。同时也说明了产品->编辑方案中的反应缺失。
我需要任何好的解决方案
文件没有找到错误吗?
我不知道怎么解决这个问题。
在断开软件包并没有运行pod安装之前,
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
尽管如此,我还是运行了命令并链接了本机依赖项。我得到了这个运行时错误:NativeModules.RNRadar是未定义的
react-native link react-native-radar
跑了两次检查:
D:\react-native-project\radar>react-native link react-native-radar
Scanning folders for symlinks in D:\react-native-project\radar\node_modules (46ms)
rnpm-install info Platform 'ios'
TypeError:无法读取未定义(读取“配置”)的属性
在使用react原生run-android运行项目时面临这个问题。
at Object.dependencyConfig (/node_modules/@react-native-community/cli-platform-ios/build/config/index.js:102:37)
at /usr/local/lib/node_modules/react-native/node_modules/@react-native-community/cli-config/build/loadConfig.js:47:61
我正在尝试运行react-native log-android来测试在我的react-native手机应用程序上上传谷歌照片。我得到了错误 warn The following packages use deprecated "rnpm" config that will stop working from next release:
- react-native-fetch-blob: https://github.com/wkh237/react-native-fetch-blob#readme
- react-native-google-signin: http
下面,我试过了,但Webview被声明为重复的。获取时出错。 import { WebView } from 'react-native-webview-old';
import { WebView as WebViewLatest } from 'react-native-webview-latest';
let WebView;
if (Platform.OS === 'android') WebView = require('react-native-webview-latest').WebView;
else if (
我想为我的iOS react本机项目启用Hermes,但是我有下一个错误:
In file included from ../ios/Pods/RCT-Folly/folly/Singleton.cpp:35:
../ios/Pods/RCT-Folly/folly/portability/FmtCompile.h:19:10: fatal error: 'fmt/compile.h' file not found
#include <fmt/compile.h>
^~~~~~~~~~~~~~~
我的配置:
System:
OS: macO
我正在为一个React-Native Android项目设置一个Bazel构建。因为我不会使用Android Studio和Gradle,所以我需要调用react-native cli来创建RN包。我尝试了genrule和nodejs_binary规则的几种组合,以及对react-native、npx react-native和react-native\cli.js的调用。这些尝试以以下两个错误之一结束:
1)
error Unrecognized command "bundle".
debug We couldn't find a package.json in yo
嗨,我创建了一个新的应用程序。
react本机init AwesomeProject
cd AwesomeProject
npm安装-保存反应-导航
npm安装-保存反应本机手势处理程序
反应-本机链接
react本机运行-ios
每次都出错。如果有人有理想,如何克服这个问题,那就太好了。
TypeError: instance.render is not a function. (In 'instance.render()', 'instance.render' is undefined)
This error is loca
我当前正在尝试运行react本机应用程序,但在Windows10中遇到此错误。
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_251;
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android develo
编辑:我的解决方案是在升级之前使用以前的PodFile,ios应用程序现在正在工作。
我使用react-native upgrade将一个RN应用程序升级到0.59.1 ( 0.57.8),安卓版本正在工作,但对于ios版本,我只能使用pod安装来控制这个错误:
[!] No podspec found for `FBLazyVector` in `../node_modules/react-native/Libraries/FBLazyVector几乎都有反应--本机依赖关系产生了类似的错误,我知道通过逐个注释豆荚并运行pod install。
这是我的个人档案:
# Uncomment
无论我是否在渲染代码中使用Provider,我都会得到一个空白屏幕。然后,我发现即使我只是从react-redux导入Provider,我也会得到一个空白屏幕。但如果我注释掉import { Provider } from 'react-redux',这些应用程序就能成功地工作。
正如官方repo所建议的那样,我已经检查了没有与npm ls react一起安装的重复的react模块,并且react-redux的版本高于5,它应该可以与react-native一起工作。
我该如何解决这个问题呢?谢谢。
App.js:
import React from 'react
当我尝试使用@react导航/底部选项卡时,会出现以下错误:
Error: Requiring unknown module "undefined". If you are sure the module exists, try restarting Metro. You may also want to run `yarn` or `npm install`.
MaterialBottomTabView@http://10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false&ap
我试着在我的mac上运行genymotion仿真器上的本机应用程序react。当我写react-native run-android的时候
Running /usr/local/opt/android-sdk/platform-tools/adb reverse tcp:8081 tcp:8081
error: closed
Could not run adb reverse: Command failed: /usr/local/opt/android-sdk/platform-tools/adb reverse tcp:8081 tcp:8081
Building and installi
当我在应用程序中的各个组件上运行一些单元测试时,我一直收到这个恼人的警告:
NativeModules.RNViewShot is undefined. Make sure the library is linked on the native side.
在我的根dir中,我运行'react-native link'并在控制台中看到这一点:
rnpm-install info Platform 'ios' module react-native-view-shot is already linked
rnpm-install info Platform
我试图在batchGetItem上使用DynamoDB执行一个react-native,它引发了以下错误:
Error: Missing credentials in config
at Request.VALIDATE_REGION (aws-sdk-react-native.js:10326)
at Request.callListeners (aws-sdk-react-native.js:10112)
at Request.emit (aws-sdk-react-native.js:10084)
at Request.emit (aws-sdk-reac
当我在我的react本机项目中运行pod install时,我得到了这个错误-
!] /usr/bin/bash -c
set -e
#!/bin/bash
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME
我已经有几天无法运行我的Reactive原住民应用程序了。我从一个问题到另一个问题.
最后一个问题,我解决不了。在运行应用程序时,我会得到以下错误消息(请参阅问题底部的完整错误消息):
Invariant Violation: requireNativeComponent: "RNSScreen" was not found in the UIManager.
我找到了,但所有的答案似乎都不适合我,我只在安卓系统上找到了问题-- iOS版本运行良好。我已经在最新版本中安装了所有建议的依赖项,我拥有干净的npn和响应本机缓存,在我的设备上重新安装应用程序等等。
我不想初始化一个新
尝试存档我的RN项目,但出现此错误。当前使用RN 0.65.1和React 17.0.2。尝试在xcode中添加libReact-hermes.a“使用库链接二进制文件”,但错误仍然存在。
ld: library not found for -lReact-hermes
require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/na
在运行npx时获取错误-- Android模拟器中的本机CLI
命令:npx react-native run-android
error: BUILD FAILED in 3s
at makeError (D:\TestProject\node_modules\@react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at D:\TestProject\node_modules\@react-native-community\cli-platform-android\node