Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6.7.4 build issue #798

Open
VishnuNCS opened this issue Dec 31, 2023 · 1 comment
Open

6.7.4 build issue #798

VishnuNCS opened this issue Dec 31, 2023 · 1 comment

Comments

@VishnuNCS
Copy link

VishnuNCS commented Dec 31, 2023

What react-native version are you using?
v0.70.9

What react-native-pdf version are you using?
v6.7.4

What platform does your issue occur on? (android/ios/both)
android

Describe your issue as precisely as possible :
In latest react-native-pdf v6.7.4 in androidManifest.xml package is missing, due to when I run the build of my project it gives below error

* Where:
Script 'D:\usersp\vishnuka\onens-esvc-fe-benefit-microapppage\node_modules\@react-native-community\cli-platform-android\native_modules.gradle' line: 450

* What went wrong:
A problem occurred evaluating script.
> Calling `[node, D:\usersp\vishnuka\onens-esvc-fe-benefit-microapppage\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

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.

When I found below ticket then understood that libraries that missing package name in AndroidManifest.xml gives this error
react-native-community/cli#1981 (comment)

@BharathKumar-c
Copy link

Hi, I'm also facing the same issues. Later, I found the solution. (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

(OR)

Upgrade the community package @react-native-community/cli
yarn upgrade @react-native-community/cli
npm update @react-native-community/cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants