skip to Main Content

Description
Previously I wanted to continue to finish my React Native Android application, but after running it, an error like this has never happened before:

Error Details
FAILURE: Build failed with an exception.

  • Where:
    Script ‘D:KonselingTelyunode_modules@react-native-communitycli-platform-androidnative_modules.gradle’ line: 450

  • What went wrong:
    A problem occurred evaluating script.

Calling [node, D:[email protected], config] finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

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.

BUILD FAILED in 3m 24s

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.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • Where:
    Script ‘D:KonselingTelyunode_modules@react-native-communitycli-platform-androidnative_modules.gradle’ line: 450

  • What went wrong:
    A problem occurred evaluating script.

Calling [node, D:[email protected], config] finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

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.

BUILD FAILED in 3m 24s

at makeError (D:KonselingTelyunode_modules@react-native-communitycli-platform-androidnode_modulesexecaindex.js:174:9)
at D:KonselingTelyunode_modules@react-native-communitycli-platform-androidnode_modulesexecaindex.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (D:KonselingTelyunode_modules@react-native-communitycli-platform-androidbuildcommandsrunAndroidrunOnAllDevices.js:109:5)
at async Command.handleAction (D:KonselingTelyunode_modules@react-native-communityclibuildindex.js:142:9)

info Run CLI with –verbose flag for more details.

  • react-native info

D:KonselingTelyu>react-native info
info Fetching system and libraries information…
(node:4328) Warning: Accessing non-existent property ‘padLevels’ of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
System:
OS: Windows 10 10.0.19045
CPU: (4) x64 Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz
Memory: 6.69 GB / 11.90 GB
Binaries:
Node: 18.12.1 – C:Program Filesnodejsnode.EXE
Yarn: Not Found
npm: 9.7.2 – C:Program Filesnodejsnpm.CMD
Watchman: Not Found
SDKs:
Android SDK:
API Levels: 28, 30, 31, 33
Build Tools: 28.0.3, 30.0.2, 30.0.3, 31.0.0
System Images: android-28 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom
Android NDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Version 2020.3.0.0 AI-203.7717.56.2031.7678000
Visual Studio: Not Found
Languages:
Java: 11.0.17
npmPackages:
@react-native-community/cli: Not Found
react: 18.1.0 => 18.1.0
react-native: 0.70.6 => 0.70.6
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found

  • npm list @react-native-community/cli

[email protected] D:KonselingTelyu
-- [email protected] — @react-native-community/[email protected]

  • package.json

{
"name": "KonselingTelyu",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"@firebase/firestore": "^3.12.0",
"@react-native-async-storage/async-storage": "^1.17.11",
"@react-native-firebase/app": "^17.5.0",
"@react-native-firebase/firestore": "^17.5.0",
"@react-navigation/bottom-tabs": "^6.5.2",
"@react-navigation/native": "^6.1.1",
"@react-navigation/stack": "^6.3.10",
"@reduxjs/toolkit": "^1.9.5",
"firebase": "^9.16.0",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-flash-message": "^0.4.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "^2.8.0",
"react-native-image-picker": "^5.0.1",
"react-native-restart": "^0.0.24",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2",
"react-native-svg": "^13.6.0",
"react-native-svg-transformer": "^1.0.0",
"react-native-update-cli": "^1.11.0",
"react-native-version-check": "^3.4.7",
"react-redux": "^8.1.1",
"xlsx": "^0.18.5"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"babel-jest": "^26.6.3",
"eslint": "^7.32.0",
"jest": "^26.6.3",
"metro-react-native-babel-preset": "0.72.3",
"react-test-renderer": "18.1.0"
},
"jest": {
"preset": "react-native"
}
}

2

Answers


  1. I also encountered this situation, and in order to save time, I executed the following command:

    rm -rf ./android/app/release
    

    I am using Android Studio to generate an APK, so the directory mentioned is /android/app/release.

    Login or Signup to reply.
  2. I had the same issue for days but i was able to resolve it by using yarn install expo@^48.0.0 to upgrade my expo project and npx expo install --fix to fix all dependencies to match the SDK 48.

    I hope this helps someone.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search