Error: Unable to determine the current character, it is not a string, number, array, or object in react-native for android
SOLUTION 1 (worked for me)
The solution for me was removing the following line
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
Be sure to remove it everywhere. I had this line in build.gradle (app) and also in settings.gradle.
After that, run again npx react-native run-android the console will display the real error, fix the error and put back the lines you had removed.
In my case the error happened because I have been using an older Node version and the second time It happened I needed to sync my project again
SOLUTION 2
Delete the files it was finding error as "The current character read is 'E' with an int value of 69"
Deleting
app\build\intermediates\signing_config\debug\out\signing-config.json
worked for others too.
SOLUTION 3
Update the @react-native-community/cli to the latest version.
Good coding!
I think this problem is only in the newer version (0.61) I had the same issue and I just used the older version (0.60.0)
npx react-native init AwesomeProject --version 0.60.0
Just removed the build folder inside android and go to android folder and then in powershell typed ./gradlew
clean and then cd..
=> npx react-native run-android