简体   繁体   中英

React Native CLI failed to determine Android project configuration

I'm trying to build my android project but I'm facing a configuration error. Previously I built an app bundle, but after that, I'm receiving the following error.

I already deleted node_nodules and tried "yarn install" but the error persist.

    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

Fixed follow the following:

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 can be found in:

${PROJECT_FOLDER}/node_modules/@react-native-community/cli-platform-android/native_modules.gradle

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM