Response-native \ react.gradle does not exist

I created an application using native responsive and I am trying to generate apk. After I did something in the document http://facebook.imtqy.com/react-native/docs/signed-apk-android.html#content . An error has occurred and it says Failed to read the react-native \ react. Grad script because it does not exist.

Here is the error

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\User\Desktop\Aaa\android\app\build.gradle' line: 68

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not read script 'C



*   // override which node gets called and with what additional arguments
*   nodeExecutableAndArgs: ["node"],
*
*   // supply additional arguments to the packager
*   extraPackagerArgs: []
* ]
*/

apply from: "../../node_modules/react-native/react.gradle"

/**
 * Set this to true to create two separate APKs instead of one:
 *   - An APK that only works on ARM devices
 *   - An APK that only works on x86 devices
 * The advantage is the size of the APK is reduced by about 4MB.
 * Upload all the APKs to the Play Store and people will download
 * the correct one based on the CPU architecture of their device.
 */
def enableSeparateBuildPerCPUArchitecture = false
+17
source share
3 answers

Go to the root folder of the project and run npm installit and it will generate the necessary files, includingreact.gradle

If you do not have node.js, you can download it here: https://nodejs.org/en/download/

+23
source

npm install

.

+5

only npm installations will not solve. You must start npm i @ Reaction-native-community / cli and then install npm. I did it and will resolve in minutes. Do this process by running cmd as administrator

0
source

Source: https://habr.com/ru/post/1678793/


All Articles