[英]Committed changes on one branch break things on another branch
Here's a rundown of the issue:这是问题的概要:
I haven't made any changes to the first branch, git log is the same as it was before, why is this happening?我没有对第一个分支做任何修改,git日志和之前一样,为什么会这样?
Both are now failing in Android Studio too, though with a different error.两者现在都在 Android Studio 中失败,但错误不同。
Xcode errors: Xcode 错误:
ENOENT: no such file or directory – I think this is because of a space in my path.
ENOENT:没有这样的文件或目录——我认为这是因为我的路径中有一个空格。 It wasn't an issue before I did the update but if I fix that, I get:
在我进行更新之前这不是问题,但如果我解决了这个问题,我会得到:
The sandbox is not in sync with podfile.lock (What is the sandbox? I wonder if this is the issue?)
沙箱与 podfile.lock 不同步(什么是沙箱?我想知道这是否是问题所在?)
Android Studio Errors: Android 工作室错误:
Gradle sync failed: Plugin with id 'maven' not found
Gradle 同步失败:找不到 ID 为“maven”的插件
The issue isn't the errors, I can find solutions to those, the issue is that it was working, nothing changed, and now it's not working.问题不是错误,我可以找到解决这些问题的方法,问题是它在工作,没有任何改变,现在它不工作了。
I've run into this two times.我遇到过两次。 The first time I read forums for hours and tried all that I could but the only thing that helped was deleting my local repo and pulling down a new one from the remote.
我第一次花几个小时阅读论坛并尽我所能,但唯一有帮助的是删除我的本地存储库并从远程拉下一个新的。 But, it'd be nice to not have to do that every time I update something.
但是,如果我每次更新某些东西时不必这样做就好了。
Has anyone run into this?有人遇到过这个吗?
Here're some specs if helpful:如果有帮助,这里有一些规格:
Many thanks in advance!提前谢谢了!
The issue is probably that changes were made to files that are in your gitignore, possibly the Podfile.lock and within node_modules.问题可能是对 gitignore 中的文件进行了更改,可能是 Podfile.lock 和 node_modules 中的文件。 When switching back to your original branch, you'll have to run yarn / npm install again, and then pod install.
当切换回原来的分支时,你必须再次运行 yarn / npm install,然后 pod install。 The "sandbox" error occurs when the contents of the Pods directory is out of sync with what is prescribed in the Podfile.
当 Pods 目录的内容与 Podfile 中规定的内容不同步时,就会发生“沙盒”错误。
If you've already done that, try stopping your Metro instance and running npx react-native-clean-project
.如果您已经这样做了,请尝试停止您的 Metro 实例并运行
npx react-native-clean-project
。 There are several caches that could need to be invalidated or refreshed: native builds, Metro, gradle, watchman, etc.有几个缓存可能需要失效或刷新:原生构建、Metro、gradle、watchman 等。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.