React Native CLI не смог определить Android конфигурацию проекта - PullRequest
1 голос
/ 29 января 2020

Я пытаюсь построить свой android проект, но я сталкиваюсь с ошибкой конфигурации. Ранее я создавал пакет приложений, но после этого я получаю следующую ошибку.

Я уже удалил node_nodules и попытался установить yarn, но ошибка сохраняется.

    D:\ReactNative\Mapin\android>gradlew assembleRelease
Starting a Gradle Daemon, 10 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* Where:
Script 'D:\ReactNative\Mapin\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 206

* What went wrong:
A problem occurred evaluating script.
> React Native CLI failed to determine Android project configuration. This is likely due to misconfiguration. Config output:
  [root:D:\ReactNative\Mapin\android, reactNativePath:D:\ReactNative\Mapin\node_modules\react-native, dependencies:[:], commands:[], assets:[], platforms:[:], haste:[providesModuleNodeModules:[], platforms:[]], project:[:]]

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 15s

1 Ответ

0 голосов
/ 30 января 2020

Исправлено следующее:

yarn add @react-native-community/cli-platform-android@3.0.3
yarn add react-native@0.61.5
Removed "--quiet" from npx.cmd in native_modules.gradle
cd android && gradlew clean

native_modules.gradle можно найти в:

${PROJECT_FOLDER}/node_modules/@react-native-community/cli-platform-android/native_modules.gradle
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...