Reputation: 893
I'm trying to get started with Android with React Native and I'm trying to the get the starter project (AwesomeProject) working. I keep getting the following error:
➜ 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
Upvotes: 2
Views: 3155
Reputation: 5643
Looks like a file for gradle is missing. Try and remove the .gradle directory and building again
Upvotes: 6