我对标题中提到的错误感到头疼。\n我正在使用react-native-gifted-charts(https://www.npmjs.com/package/react-native-gifted-charts/v/1.0.3)\n图表在 ios 中完美运行,但在 Android 中它不断崩溃并抛出“Invariant Violation: requireNativeComponent: 在 UIManager 中找不到“RNSVGSvgViewAndroid”。”\n首先我认为这是我的代码的问题,因为它之前适用于 Android ,但即使我反转代码,错误仍然存在。\n我正在使用yarn作为包管理器和Expo托管工作流程。\n依赖项如下。
\n"react-native": "0.70.5",\n"react-native-gifted-charts": "^1.2.42",\n"react-native-linear-gradient": "2.6.2",\n"react-native-svg": "12.1.0",\n\nRun Code Online (Sandbox Code Playgroud)\n\xe2\x96\xa0我尝试过的事情
\nimport React, { useState } from "react";\nimport { View, StyleSheet, Text, TouchableOpacity, ScrollView } from "react-native";\nimport type { NativeStackScreenProps } from "@react-navigation/native-stack";\nimport { MainStackParamList } from "../types/navigation";\nimport dayjs from "dayjs";\nimport { BarChart, LineChart, PieChart } from "react-native-gifted-charts";\nimport …Run Code Online (Sandbox Code Playgroud) 再会,
\n我正在使用 expo 版本 5.4.12\n我尝试运行我的应用程序,但在启动时出现错误
\n"ApiV2Error: Account not found.\n\xc2\xa0 \xc2\xa0 at ApiV2Client._requestAsync"\nRun Code Online (Sandbox Code Playgroud)\n有人遇到过这个问题吗?请帮我。
\n当我使用 expo 运行 React Native 项目时,出现此错误“此项目使用 SDK 38.0.0,但此版本的 Expo Go 仅支持以下 SDK:43.00、42.0.0、41.0.0、40.0.0。加载项目,必须更新到支持的 SDK 版本或者必须使用旧版本的 Expo Go” 我已经在项目中安装了所有需要的包,那么如何解决这个问题?
"dependencies": {
"@eva-design/eva": "^2.1.1",
"@react-navigation/drawer": "^6.1.8",
"@react-navigation/native": "^6.0.6",
"@react-navigation/native-stack": "^6.2.5",
"@ui-kitten/components": "^5.1.1",
"expo": "~38.0.8",
"expo-status-bar": "^1.0.2",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-gesture-handler": "1.6.0",
"react-native-reanimated": "1.9.0",
"react-native-safe-area-context": "3.0.7",
"react-native-screens": "2.9.0",
"react-native-svg": "12.1.0",
"react-native-web": "~0.11.7"
},
Run Code Online (Sandbox Code Playgroud) 我想在 React Native 代码中确定该应用程序是在 Expo Go 中运行还是作为独立的 iOS/Android 应用程序运行。
\n我可以\xe2\x80\x99t 使用__DEV__,因为我希望能够为生产版本确定这一点。
消息:“运行请求的应用程序时出现问题”。“不兼容的 SDK 版本或未指定 SDK 版本。此版本的 Expo Go 仅支持以下 SDK:44.0.0、45.0.0、46.0.0。”
npx expo start在任何设备(Android 或 Ios)和任何模拟器(Android 或 Ios)上运行应用程序
试过了expo upgrade,结果是不需要升级。尝试删除node_modules并yarn再次运行。尝试删除模拟器上的expo go客户端并重新安装。
关于世博会问题的链接
有什么解决办法吗?
iOS系统
46
expo-env-info 1.0.5 environment info:
System:
OS: macOS 12.6
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.14.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.5.0 - /usr/local/bin/npm
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0
IDEs: …Run Code Online (Sandbox Code Playgroud) 在独立应用程序上它显示了
You can't sign in to this app because it doesn't comply with Google's OAuth 2.0 policy for keeping apps secure这一点并且没有发生任何事情。但在模拟器中一切正常。
我的代码
import * as GoogleSignIn from 'expo-auth-session/providers/google';
WebBrowser.maybeCompleteAuthSession();
const [request, response, promptAsync] = GoogleSignIn .useAuthRequest({
expoClientId: 'id',
androidClientId: 'id',
});
useEffect(() => {
if (response?.type === 'success') {
const { authentication } = response;
}
}, [response]);
Run Code Online (Sandbox Code Playgroud) expo go我正在尝试使用和为我的 React Native 应用程序进行数据备份expo-file-system
await Filesystem.writeAsStringAsync(
Filesystem.documentDirectory! + "GymTracker-Data.json",
JSON.stringify(exportData)
)
Run Code Online (Sandbox Code Playgroud)
如何使用或 等documentDirectory文件浏览器应用程序访问此内容?File ManagerAmaze File Manager
我尝试打印应用程序上的路径,但找不到所述路径。
运行Expo应用程序时,您可能会遇到错误消息“Cannot read property \'getConstants\' of null, js engine: hermes\”。
\n我不知道原因,也不知道在哪里修复它。
\n\xef\xb8\x8f错误图像:
\n
我使用命令“npx expo start”来运行它。
\n我希望在 Expo Go 应用程序上对其进行实时测试。
\n请帮我。
\nnpx expo start我正在尝试与我的“纯”react-native 项目一起使用(即我使用 React Native 的 CLI 创建了该项目)
当我运行时npx expo start,我收到此错误:
iOS Bundling complete 36518ms
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes
Run Code Online (Sandbox Code Playgroud)
在这个stackoverflow 线程之后,我确保我的应用程序名称是和中的“sotravelapp” package.json,它从 …
我想在世博应用程序中实现谷歌登录。但是在阅读文档时,它说 expo-google-sign-in 不能在 Expo Go 中使用。但它仅适用于独立的 Expo 应用程序 https://docs.expo.dev/versions/latest/sdk/google-sign-in/#usage-with-firebase 我不明白这意味着什么。
我已经使用expo init命令创建了 expo 应用程序。这是独立应用程序还是 Expo go?
请让我澄清这一点。