3

I've created a react native app, by simply doing:

react-native init app

I've followed this tutorial: Facebook Getting Started (I use Linux)

and I have done exactly what it says.

However, when I try to run the app (react-native run-android), I got the following message:

Starting JS server... Building and installing the app on the device (cd android && ./gradlew installDebug)... Exception in thread "main" java.lang.RuntimeException: Could not determine wrapper version. at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:111) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Caused by: java.lang.RuntimeException: No build receipt resource found. at org.gradle.wrapper.GradleWrapperMain.wrapperVersion(GradleWrapperMain.java:97) ... 1 more 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 ```

How can I solve this problem?

Eldelshell
  • 6,683
  • 7
  • 44
  • 63
sadtroll
  • 191
  • 4
  • 17

2 Answers2

10

According to this link https://github.com/MinecraftForge/ForgeGradle/issues/227 it's because you have some special character in your project path (like "!")

eladc
  • 243
  • 2
  • 6
0

I got the same issue in a Flutter project as I was organizing some of my projects. In my case also found that my source path contained special characters when I change the folders, after removing it works perfectly fine. This will usually happen to project that contains java code and I think this is because java is compiled based on the path you provide, so the compiler does not understand the special characters we used