gpt4 book ai didi

cocoapods - 需要升级现有项目的RN版本

转载 作者:行者123 更新时间:2023-12-05 07:18:18 25 4
gpt4 key购买 nike

我使用的是 react-native 版本 0.59.5。我需要将我的 react-native 升级到最新版本 61.2。有人可以帮我弄这个吗。我必须对 podfile 进行更改吗???

React Native Environment Info:
System:
OS: macOS 10.14.6
CPU: (4) x64 Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
Memory: 2.56 GB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.4.0 - /usr/local/bin/node
npm: 6.9.2 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.1, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.1/11A1027 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: 0.59.5 => 0.59.5
npmGlobalPackages:
react-native-cli: 2.0.1

我使用了 react-native upgrade 我的整个 podfile 都显示冲突

需要在现有项目中升级到最新版本的 react-native。我收到以下错误

info No version passed. Fetching latest...
info Fetching diff between v0.59.5 and v0.61.2...
info Applying diff...
warn Excluding files that exist in the template, but not in your project:
- android/app/src/main/java/com/bublenet/MainActivity.java
- android/app/src/main/java/com/bublenet/MainApplication.java
- ios/bublenet-tvOS/Info.plist
- ios/bublenet.xcodeproj/project.pbxproj
- ios/bublenet/Info.plist
- ios/bublenetTests/bublenetTests.m
error Excluding files that failed to apply the diff:
- App.js
- android/app/build.gradle
- android/app/proguard-rules.pro
- android/build.gradle
- android/gradlew.bat
- android/settings.gradle
- ios/Podfile
- ios/bublenet.xcworkspace/contents.xcworkspacedata
Please make sure to check the actual changes after the upgrade command is finished.
You can find them in our Upgrade Helper web app: https://react-native-community.github.io/upgrade-helper/?from=0.59.5&to=0.61.2
error Automatically applying diff failed. We did our best to automatically upgrade as many files as possible
warn Continuing after failure. Some of the files are upgraded but you will need to deal with conflicts manually
info Installing "react-native@0.61.2" and its peer dependencies...
info Running "git status" to check what changed...
On branch upgrading_rn
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)

new file: .eslintrc.js
new file: .prettierrc.js
new file: android/app/debug.keystore
modified: android/app/src/main/res/values/styles.xml
modified: android/gradle/wrapper/gradle-wrapper.jar
modified: android/gradlew
deleted: android/keystores/BUCK
deleted: android/keystores/debug.keystore.properties
modified: package-lock.json
modified: package.json

Unmerged paths:
(use "git reset HEAD <file>..." to unstage)
(use "git add <file>..." to mark resolution)

both modified: .flowconfig
both modified: .gitignore
both modified: android/gradle.properties
both modified: android/gradle/wrapper/gradle-wrapper.properties

Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)

modified: ios/Podfile.lock
modified: ios/bublenet.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings

warn Please run "git diff" to review the conflicts and resolve them
info You may find these resources helpful:
• Release notes: https://github.com/facebook/react-native/releases/tag/v0.61.2
• Manual Upgrade Helper: https://react-native-community.github.io/upgrade-helper/?from=0.59.5&to=0.61.2
• Git diff: https://raw.githubusercontent.com/react-native-community/rn-diff-purge/diffs/diffs/0.59.5..0.61.2.diff
error Upgrade failed. Please see the messages above for details. Run CLI with --verbose flag for more details.

最佳答案

在这种情况下尝试使用这个网站

react-native-community.github.io/upgrade-helper 

并输入您的旧版本和新版本以显示差异并手动更改 misseed 文件。

关于cocoapods - 需要升级现有项目的RN版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58393349/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com