Подтвердить что ты не робот

Response-native\react.gradle не существует

Я создал приложение, используя реагировать родной, и я пытаюсь сгенерировать apk. После того, как что-то сделал в документе http://facebook.github.io/react-native/docs/signed-apk-android.html#content. Произошла ошибка, и это говорит Не удалось прочитать сценарий реагировать-нативный\реагировать.градию, так как он не существует.

Здесь ошибка

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
4b9b3361

Ответ 1

Перейдите в корневую папку проекта и запустите npm install, и он сгенерирует необходимые файлы, включая react.gradle

Если у вас нет node.js, вы можете скачать его здесь: https://nodejs.org/en/download/

Ответ 2

вы можете сделать npm install

и все проблемы завершены.

Ответ 3

только установки npm не решат. Вы должны запустить npm i @Reaction-native-community/cli и затем установить npm. Я сделал это и разрешим за мин. Сделайте этот процесс, запустив cmd от имени администратора