Shivam Jaiswal
Shivam Jaiswal

Reputation: 1

java.lang.Exception: Calling @react-native-community * Unable to determine the current character, it is not a string, number, array, or object

-I am updating my Salesforce Mobile SDK from 10.2 to 11.0.1 while doing it i am getting this error . -I have created a new project in which sdk is 11.0.1 when i am trying to add my packages which i am using then i am getting this below error messgae tried many solution but none of them are working.

java.lang.Exception: Calling [myProject/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 have resolved this issue by deleting the below line from build.gradle(app) and setting.gradle.

apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)

But after this, i am getting this new error in my MainApplication.java- Cannot resolve the symbol 'PackageList' to solve this I have tried deleting the node module and adding a new node module.

can someone help me to resolve this issue.

Upvotes: -1

Views: 1527

Answers (1)

Raj Parmar
Raj Parmar

Reputation: 178

1.Check JSON Files: Verify syntax errors in package.json and SDK config files.

2.Update Dependencies: Use npm-check-updates to update packages.

3.Clean npm Cache: Run npm cache clean -f to clear cache.

4.Node Version: Confirm compatible Node.js version.

5.SDK Configuration: Validate Mobile SDK config files for format.

6.Community Help: Check GitHub repos and issue trackers.

Blockquote

7.Documentation: Refer to Salesforce Mobile SDK documentation for updates.

8.Debugging: Add logs/debugger to pinpoint JSON parsing error.

Upvotes: 1

Related Questions