Quantcast
Channel: Active questions tagged react-native+android - Stack Overflow
Viewing all articles
Browse latest Browse all 29553

react-native-community: groovy.json.JsonException,Unable to determine the current character, it is not a string, number, array, or object

$
0
0

I tried to set up a react native project in my Ubuntu 22.04.3 LTS(64-bit) system. The build failed with the following error:

FAILURE: Build failed with an exception.

Where: Script '/home/ravi/react-native/vrnative/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 250

What went wrong: A problem occurred evaluating the script.

Calling [node, /home/ravi/react-native/vrnative/node_modules/@react-native-community/cli/build/bin.js, config] finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or objectThe current character read is 'i' with an int value of 105 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0 info Run CLI with --verbose flag for more details. ^. Output: info Run CLI with --verbose flag for more details.

The current character read is 'i' with an int value of 105 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0 info Run CLI with --verbose flag for more details. ^. Output: info Run CLI with --verbose flag for more details.

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 2s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

at makeError (/home/ravi/react-native/vrnative/node_modules/execa/index.js:174:9)

at /home/ravi/react-native/vrnative/node_modules/execa/index.js:278:16

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

at async runOnAllDevices (/home/ravi/react-native/vrnative/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)

at async Command.handleAction (/home/ravi/react-native/vrnative/node_modules/@react-native-community/cli/build/index.js:192:9)

I tried node_modules and package-lock.json and then yarn install and yarn android, still facing same issue, then I do ./gradlew clean and also delete build folder again getting same issue.

I also tried to remove apply from: file("../../../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) but still facing same issue.

I am using the following technology stack for the project setup:Node: v20.17.0Yarn: 1.22.22npm: 10.8.2watchman: 4.9.0react-native-cli: 2.0.1react-native: 0.69.8-1


Viewing all articles
Browse latest Browse all 29553

Trending Articles