- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我最近将使用react-native 0.59 的项目更新为0.61.4。
Android 构建工作正常,但 ios 失败并出现错误:
'React/RCTBundleURLProvider.h' file not found
在我的项目消息扩展中。我尝试了此问题的所有主要修复,例如:
https://github.com/facebook/react-native/issues/12077#issuecomment-302318906
尝试创建一个 React 方案,但我无法做到这一点,因为当我尝试创建该方案时没有显示 React。
我的 Podfile
platform :ios, '9.0' require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'Project' do # Pods for Project pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector" pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec" pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired" pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety" pod 'React', :path => '../node_modules/react-native/React' pod 'React-Core', :path => '../node_modules/react-native/' pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules' pod 'React-Core/DevSupport', :path => '../node_modules/react-native/' pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS' pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation' pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob' pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image' pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS' pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network' pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings' pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text' pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration' pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/' pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact' pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi' pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor' pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector' pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon" pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon" pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga' pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info' pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec' pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec' pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec' pod 'RNKeychain', :path => '../node_modules/react-native-keychain' pod 'react-native-background-timer', :path => '../node_modules/react-native-background-timer' pod 'react-native-udp', :path => '../node_modules/react-native-udp' pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons' pod 'react-native-fingerprint-scanner', :path => '../node_modules/react-native-fingerprint-scanner' pod 'react-native-randombytes', :path => '../node_modules/react-native-randombytes' pod 'RNSVG', :path => '../node_modules/react-native-svg'
target 'ProjectTests' do
inherit! :search_paths
# Pods for testing end
target 'ProjectMessageExtension' do
inherit! :search_paths end
use_native_modules! end
target 'Project-tvOS' do # Pods for Project-tvOS
target 'Project-tvOSTests' do
inherit! :search_paths
# Pods for testing end
end
我的package.json
{
"name": "Project",
"version": "1.2.1",
"private": true,
"description": "",
"homepage": "",
"bugs": "",
"scripts": {
"start": "react-native start",
"build:android": "react-native run-android",
"build:ios": "react-native run-ios",
"release:android": "cd android && ./gradlew assembleRelease",
"release:android-bundle": "cd android && ./gradlew bundleRelease",
"link": "./node_modules/.bin/rn-nodeify --hack --install && node ./scripts/androidSdkFix.js",
"test": "jest --config ./jest.config.js --env=jsdom",
"test:live": "npm test -- --watch",
"test:format": "./node_modules/.bin/eslint ./",
"test:android": "cd android && ./gradlew --project-cache-dir ../.gradlecache test",
"i18n": "node ./scripts/scanner.config.js",
"test:build-e2e-release": "detox build --configuration ios.sim.release",
"test:build-e2e-debug": "detox build --configuration ios.sim.debug",
"test:e2e-clean": "detox clean-framework-cache && detox build-framework-cache",
"test:e2e-release": "node ./node_modules/cucumber/bin/cucumber-js e2e --format node_modules/cucumber-pretty --configuration ios.sim.release",
"test:e2e-debug": "node ./node_modules/cucumber/bin/cucumber-js e2e --format node_modules/cucumber-pretty --configuration=ios.sim.debug",
"prettier": "prettier 'src/**/*.js'",
"eslint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check"
},
"rnpm": {
"assets": [
"./src/assets/fonts/"
]
},
"lint-staged": {
"*.js": "eslint"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged",
"pre-push": "npm test"
}
},
"dependencies": {
"@react-native-community/async-storage": "^1.5.0",
"@react-native-community/netinfo": "3.2.1",
"@react-navigation/core": "^3.4.2",
"@react-navigation/native": "^3.5.0",
"@remobile/react-native-qrcode-local-image": "github:yasharAyari/react-native-qrcode-local-image#support-import-from-cameraroll",
"@tradle/react-native-http": "^2.0.1",
"assert": "^1.4.1",
"axios": "^0.19.0",
"base-x": "=3.0.4",
"bignumber.js": "^7.2.1",
"bip32": "^1.0.2",
"bitcoinjs-lib": "^4.0.3",
"browserify-zlib": "^0.1.4",
"buffer": "^4.9.1",
"buffer-reverse": "^1.0.1",
"console-browserify": "^1.1.0",
"constants-browserify": "^1.0.0",
"dns.js": "^1.0.1",
"domain-browser": "^1.2.0",
"events": "^1.1.1",
"fetch-mock": "^7.2.5",
"history": "^4.7.2",
"hoist-non-react-statics": "^3.1.0",
"https-browserify": "0.0.1",
"i18next": "^13.1.2",
"lottie-react-native": "^3.2.1",
"moment": "^2.22.0",
"path-browserify": "0.0.0",
"process": "^0.11.10",
"prop-types": "^15.6.0",
"punycode": "^1.4.1",
"querystring-es3": "^0.2.1",
"react": "^16.12.0",
"react-i18next": "^9.0.2",
"react-native": "0.61.4",
"react-native-app-settings": "github:KrazyLabs/react-native-app-settings",
"react-native-background-timer": "^2.1.0-alpha.6",
"react-native-blur-overlay": "github:yasharAyari/react-native-blur-overlay",
"react-native-camera": "^2.11.1",
"react-native-camera-roll-picker": "^1.2.3",
"react-native-crypto": "^2.1.2",
"react-native-device-info": "^4.0.1",
"react-native-dropdownalert": "^3.9.2",
"react-native-fingerprint-scanner": "^3.0.2",
"react-native-gesture-handler": "^1.4.1",
"react-native-haptic-feedback": "^1.4.2",
"react-native-http": "github:tradle/react-native-http#834492d",
"react-native-interactable": "1.0.0",
"react-native-keyboard-aware-scroll-view": "^0.8.0",
"react-native-keyboard-tracking-view": "^5.5.0",
"react-native-keychain": "=3.0.0",
"react-native-level-fs": "^3.0.1",
"react-native-modal": "^6.1.0",
"react-native-modalbox": "^1.7.1",
"react-native-os": "^1.2.4",
"react-native-permissions": "^1.1.1",
"react-native-qrcode-svg": "^5.1.0",
"react-native-quick-actions": "^0.3.9",
"react-native-randombytes": "^3.5.0",
"react-native-reanimated": "^1.4.0",
"react-native-shake": "^3.3.1",
"react-native-snap-carousel": "^3.7.5",
"react-native-splash-screen": "^3.1.1",
"react-native-svg": "^8.0.11",
"react-native-svg-uri": "=1.2.3",
"react-native-swiper": "^1.6.0-rc.3",
"react-native-switch-pro": "^1.0.0-beta",
"react-native-tcp": "^3.3.0",
"react-native-udp": "^2.6.1",
"react-native-vector-icons": "^6.0.2",
"react-navigation": "^3.12.1",
"react-navigation-tabs": "^2.3.0",
"react-redux": "^5.0.7",
"react-router": "^4.2.0",
"react-test-renderer": "16.8.3",
"react-transform-hmr": "^1.0.4",
"readable-stream": "^1.0.33",
"redux": "^3.7.2",
"redux-connect-decorator": "^0.2.0",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.2.0",
"socket.io-client": "^2.1.1",
"stream-browserify": "^1.0.0",
"string_decoder": "^0.10.31",
"text-encoding": "^0.6.4",
"timers-browserify": "^1.4.2",
"tty-browserify": "0.0.0",
"url": "^0.10.3",
"url-parse": "^1.4.4",
"util": "^0.10.4",
"vm-browserify": "0.0.4"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/plugin-proposal-decorators": "^7.1.0",
"@babel/plugin-transform-react-jsx-source": "^7.0.0",
"@babel/preset-env": "^7.5.5",
"@babel/preset-stage-2": "^7.0.0",
"@babel/runtime": "^7.4.5",
"@react-native-community/eslint-config": "^0.0.3",
"asyncstorage-down": "^4.0.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "=8.0.2",
"babel-jest": "^24.8.0",
"babel-plugin-rewrite-require": "^1.14.5",
"babel-plugin-transform-class-properties": "^6.24.1",
"babel-plugin-transform-decorators": "^6.24.1",
"babel-plugin-transform-decorators-legacy": "^1.3.5",
"babel-preset-env": "^1.7.0",
"babel-preset-react": "^6.24.1",
"coveralls": "^3.0.2",
"cucumber": "5.1.0",
"cucumber-pretty": "1.5.0",
"detox": "14.5.0",
"eslint": "=4.18.2",
"eslint-config-airbnb": "=15.1.0",
"eslint-config-airbnb-base": "=12.1.0",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-babel": "=4.1.2",
"eslint-plugin-detox": "1.0.0",
"eslint-plugin-import": "=2.7.0",
"eslint-plugin-jest": "=21.22.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "=7.4.0",
"findit": "^2.0.0",
"glob": "^7.1.3",
"husky": "^1.0.0-rc.13",
"i18next-scanner": "^2.9.1",
"jest": "24.8.0",
"jest-cli": "^24.8.0",
"jest-junit": "^5.2.0",
"jest-runner-eslint": "^0.6.0",
"jest-transform-stub": "^1.0.0",
"lint-staged": "^8.1.3",
"metro-react-native-babel-preset": "^0.55.0",
"moxios": "^0.4.0",
"prettier": "1.18.2",
"react-test-renderer": "16.8.3",
"redux-connect-decorator": "^0.2.0",
"redux-mock-store": "^1.5.3",
"rn-nodeify": "github:tradle/rn-nodeify",
"schedule": "^0.4.0"
},
"react-native": {
"zlib": "browserify-zlib",
"console": "console-browserify",
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"dgram": "react-native-udp",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
},
"browser": {
"zlib": "browserify-zlib",
"console": "console-browserify",
"constants": "constants-browserify",
"crypto": "react-native-crypto",
"dns": "dns.js",
"net": "react-native-tcp",
"domain": "domain-browser",
"http": "@tradle/react-native-http",
"https": "https-browserify",
"os": "react-native-os",
"path": "path-browserify",
"querystring": "querystring-es3",
"fs": "react-native-level-fs",
"_stream_transform": "readable-stream/transform",
"_stream_readable": "readable-stream/readable",
"_stream_writable": "readable-stream/writable",
"_stream_duplex": "readable-stream/duplex",
"_stream_passthrough": "readable-stream/passthrough",
"dgram": "react-native-udp",
"stream": "stream-browserify",
"timers": "timers-browserify",
"tty": "tty-browserify",
"vm": "vm-browserify",
"tls": false
},
"detox": {
"configurations": {
"ios.sim.debug": {
"binaryPath": "ios/build/Build/Products/Debug-iphonesimulator/Project.app",
"build": "xcodebuild -UseModernBuildSystem=NO -project ios/Project.xcodeproj -scheme Project -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 11"
},
"ios.sim.release": {
"binaryPath": "ios/build/Build/Products/Release-iphonesimulator/Project.app",
"build": "xcodebuild -UseModernBuildSystem=NO -project ios/Project.xcodeproj -scheme Project -configuration Release -sdk iphonesimulator -derivedDataPath ios/build",
"type": "ios.simulator",
"name": "iPhone 11"
}
}
}
}
最佳答案
0.61更新后React无法实现为Scheme。您需要从 Podfile 安装。
看看这个,0.61 Changes
If you want things to work as before, just upgrade your project to 0.60.5.
升级0.61或更高版本后,您可以尝试,
文件
删除派生数据 > 工作区设置
点击派生数据部分下的灰色小箭头,然后选择您的项目文件夹将其删除。Product
> Scheme
> 编辑方案
> Build
你可以看到前React方案为React(missing )。只需将其删除并从 Pod 中的新 React 方案中添加即可。在你的 Podfile React 中实现为,
pod 'React', :path => '../node_modules/react-native/React'
你应该这样改变它,
pod 'React', :path => '../node_modules/react-native/'
更改后,删除 Pods 和 Podfile.lock 并重新安装 Pods。
cd ios/
rm -rf Pods/ && Podfile.lock
pod install
最后一件事,您可以使用此 upgrade helper 检查您的 Podfile
关于ios - 将react-native从0.59更新到0.61.4后找不到“React/RCTBundleURLProvider.h”文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58972096/
在这种情况下,我们在应用程序中同时使用react-native-gesture-handler Touchable和react-native Touchable。 (通过Touchables,我的意思
我有一个 MainFooter包含页脚和迷你播放器的组件,单击时动画显示为全 View 。我有一个问题,每当我们点击一个页脚选项卡时,播放器最大化然后卡在那里,没有响应。 此外,播放器内部的向下箭
我在 native react 之上使用 native 基础组件,我想知道如何在 UI 中使卡片呈圆形而不是矩形。有圆形的 Prop 吗? 最佳答案 好吧,实际上没有人能回答这个问题,但幸运的是我在
我在 native react 之上使用 native 基础组件,我想知道如何在 UI 中使卡片呈圆形而不是矩形。有圆形的 Prop 吗? 最佳答案 好吧,实际上没有人能回答这个问题,但幸运的是我在
我是 react-native 的新手,所以我认为“HTML”而不是“native”可能有点太多了,所以我的问题看起来很愚蠢。 我使用 react-native-router-flux 进行路由,并使
当我使用这个例子在我的应用程序上实现 Image-slider 时,我遇到了这个错误。 import React,{Component} from 'react' import {View,T
我正在为我们的产品使用“Native Base”组件,并且效果很好, 但我有一点被卡住了,它是关于将 Items 放入 Nativebase Picker 的问题。我的代码是这样的 渲染方法代码 -
正如文档中所建议的,我将一些长的数据获取代码移动到 native 模块中以释放 JS 线程,但我观察到这仍然阻塞了 UI。为什么会这样,我能做些什么来避免这种情况? 从 JS 调用 native 模块
我正在使用一个名为 react-native-svg 的框架在 React Native View 中绘制 SVG 元素。 我的目标是,当我点击 View 时(我在全局 View 上使用 PanRes
在 IOS 中发现错误 Native Module cannot be null 我不使用 react-native-push-notification 最佳答案 这通常发生在您未能将第三个库链接到您
当应用程序关闭时,我可以获得由 Linking.getInitialURL() 点击的深层链接网址。 .当应用程序处于后台状态时,则不会安装任何内容。所以,我什至无法通过 Linking.addEve
1) 说原生库是什么意思?什么样的图书馆?那些将用作 gradle 依赖项? 2)如何链接这些?我在使用 link 或 rnpm 时遇到了麻烦。 最佳答案 链接 native 库意味着您要将已经实现的
我需要帮助来构建我的 react 原生项目。我尝试过react-native run-android,但出现以下错误: react-native : The term 'react-native' i
我需要帮助来构建我的 react 原生项目。我尝试过react-native run-android,但出现以下错误: react-native : The term 'react-native' i
我是 React-Native 的新手,到目前为止我很喜欢它。我正在尝试创建一个屏幕(用于跨平台应用程序),右上角有一个菜单图标,单击时,我想打开一个菜单,希望使用 react-native-menu
RN doco 和其他示例展示了如何从 native iOS View Controller 启动 React-Native View ,但反之则不然。谁能解释一下我该怎么做? 最佳答案 我能够弄清楚
对于 react-native - WebStorm 用户: 我正在使用 Jet Brains IDE WebStorm 开始一个带有 React Native 的项目。 在项目 => node_mo
在升级过去的 react-native 0.60 之后......我被警告我应该取消链接所有手动链接的第 3 方库(因为 RN 现在通过自动链接处理它)。 但是,当我运行 react-native u
你可以使用像 https://github.com/tolu360/react-native-google-places 这样的库吗?在世博项目中?我假设任何 npm 库都可以添加,但是像这个 goo
我主要喜欢 React Native。自 0.22 以来一直在使用它。目前为 0.35。 但是为什么链接原生库就像抽奖一样呢?我很少在第一次拍摄时让它发挥作用,而破裂的东西通常是完全不同的东西。 每个
我是一名优秀的程序员,十分优秀!