React Native Android Build Failed with react-native-community-cli error

1.9k Views Asked by At

When I ran the App from Android Studio or cli, android build fails with the following error,

Caused by: java.lang.Exception: Calling `[node, /Users/icebit-lab-06/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 object

I tried to delete package-lock.json file and node-modules and reinstall them, but it not works, I also tried to clean android builds using

./gradlew clean

but this also failed with the same error

2

There are 2 best solutions below

0
On

Try This solutions:

Solution 1: run npm i --save @react-native-community/cli-platform-android

Solution 2: Try deleting app\build\intermediates\signing_config\debug\out\signing-config.json

0
On

You can also check if your AndroidManifest.xml has the project name:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.[PROJECT_NAME]">

    <!-- more content -->

</manifest>