javascript - 无法列出 'third-party/glog-0.3.4/test-driver' 的内容。无法跟踪符号链接(symbolic link)

标签 javascript android react-native

我有一个基于react-native版本0.55.4构建的项目。它在旧系统上运行良好。由于某些原因我必须更改系统。我在新系统上设置,我可以使用react-native run-android运行项目,但是当使用./gradlew assembleRelease构建签名的APK时,我收到以下错误。

Task :app:processReleaseGoogleServices
Parsing json file:
<Project-Directory>/android/app/google-services.json

FAILURE: Build failed with an exception.
What went wrong:
Could not list contents of

'<Project-Directory>/node_modules/react-native/scripts/third-party/glog-0.3.4/test-driver'. Couldn't follow symbolic link.

我知道这个问题已经在堆栈溢出上 Invalid symlink in node_modules error when trying to deploy to simulator (RN 0.45) 。我已经尝试过了。我也尝试过以下 github 问题。

  1. https://github.com/facebook/react-native/issues/11212
  2. https://github.com/facebook/react-native/issues/14417
  3. https://github.com/facebook/react-native/issues/14548
  4. https://github.com/facebook/react-native/issues/14464

我也尝试过以下操作。

  1. 删除节点模块并重新安装
  2. 删除节点模块中的.bin文件夹
  3. 删除节点模块中的 react-native/third_party 文件夹。
  4. 从旧系统复制节点模块。
  5. 从旧系统复制第三方glog-0.3.4
  6. 删除thirdparty文件夹内的test-driver文件。
  7. 取消链接第三方文件夹内的 test-driver 文件。
  8. 安装 automake-1.16 并在 thirdparty 文件夹中创建 test-driver 文件的新别名。

我的java版本是1.8.0_201。我的android studio版本是3.3.2。项目 react 原生版本是0.55.4。我的 Mac 操作系统版本是 10.14.4。我的x代码版本是10.2。

请帮忙。 提前致谢。

最佳答案

如下取消链接并在清除缓存的情况下重新启动

在项目文件夹中:

取消链接./node_modules/react-native/scripts/third-party/glog-0.3.4/test-driver

然后停止js服务器并运行:

npm start -- --reset-cache

应该可以

关于javascript - 无法列出 'third-party/glog-0.3.4/test-driver' 的内容。无法跟踪符号链接(symbolic link),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55478549/

相关文章:

php - 所需 php 中的 Javascript 文件不起作用,但直接在文件中可以

javascript - 设置隐藏输入的值

android - 如何覆盖 Android 应用程序中音量按钮的行为?

React-Native Text 输入防止滚动

javascript - 根据 react native 中的平台显示/隐藏导航标题

javascript - react native : Swipeable and Touchable

javascript - 是否可以使用 Node-webkit 在 osx yosemite 10.10.3 上禁用最大化

javascript - 用 browserify 填充一个 jQuery 插件

android - 根据List改变constraintlayout

java - 如何在Android OpenGL中正确绘制不透明的纹理?