gpt4 book ai didi

gradle - 无法为 Android 启动 React Native

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

我正在尝试通过 React Native 开始使用 Android,并且我正在尝试让入门项目 (AwesomeProject) 正常工作。我不断收到以下错误:

➜  AwesomeProject  react-native run-android
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Exception in thread "main" java.io.FileNotFoundException: /Users/myusername/.gradle/wrapper/dists/gradle-2.4-all/6r4uqcc6ovnq6ac6s0txzcpc0/gradle-2.4-all.zip.lck (No such file or directory)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:49)
at org.gradle.wrapper.Install.createDist(Install.java:46)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

最佳答案

似乎缺少 gradle 文件。尝试删除 .gradle 目录并重新构建

关于gradle - 无法为 Android 启动 React Native,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34475495/

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