【问题标题】:Windows error :spawnSync ./gradlew EACCES error when running react native project on emulatorWindows 错误:spawnSync ./gradlew 在模拟器上运行反应本机项目时出现 EACCES 错误
【发布时间】:2020-04-16 08:57:58
【问题描述】:

我正在尝试使用 react-native run-android 运行本机反应,但出现上述错误。我在让我的分离博览会在 android 模拟器上运行时遇到问题,并且我不断收到此错误 Error running app. Have you installed the app already using Android Studio? Since you are detached you must build manually. Error: Activity not started, unable to resolve Intent { act=android.intent.action.VIEW dat=.... 经过数小时徒劳的努力,我尝试运行 react-native run-android,但我不断收到上述错误(标题)。在线解决方案spawnSync ./gradlew EACCES error when running react native project on emulator udara 显示其权限问题,可以通过以下方式解决 chmod 755 android/gradlew 因为我使用的是 Windows 系统,所以我尝试过 ICACLS "android/gradlew" /grant:r "Administrator:(F)" /C 但我仍然得到同样的错误。我对 icacls 不太好,所以我可能错了。非常感谢任何帮助。 我的模拟器运行良好,因为我做了 adb devices 检查和他们的检查。我什至已经在我的窗口上打开了模拟器

【问题讨论】:

    标签: android windows react-native android-emulator expo


    【解决方案1】:

    在你的根项目 react-native 中打开终端并输入: cd android && chmod -R 777 ./gradlew && cd ..

    【讨论】:

    • 为我工作,谢谢
    • 问题是关于 Windows 的。此外,chmod 777 永远不是正确的解决方案。
    猜你喜欢
    • 2019-06-29
    • 2021-04-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-05
    • 2021-12-22
    相关资源
    最近更新 更多