Hello,
I'm getting this error while 'sync project through Gradle files' from Android Studio.
ERROR: Failed to parse React Native CLI configuration. Expected running 'npx.cmd --quiet --no-install react-native config' command from '..\AwesomeProject' directory to output valid JSON, but it didn't. This may be caused by npx resolving to a legacy global react-native binary. Please make sure to uninstall any global 'react-native' binaries: 'npm uninstall -g react-native react-native-cli' and try again
I did this which in the message,
npm uninstall -g react-native react-native-cli
But it's still showing the error.
I want to mention, it's the first sync of the project. It's just installed with this
npx react-native init AwesomeProject
Nothing did else.
Is there any solution?
Thanks in advance
Hi @WeTruck
I had run into the same issue, could you please share the full log?
Btw, in my case, what went wrong was JAVA_HOME that was set with Java instead of JDK package. Take a shot.
Same issue here. Any solution?
I found a solution! Please see my answer at Stackoverflow:
https://stackoverflow.com/a/59507720/6421759
I tried basically every solution I could find on GH and SO to no avail.
What worked for me:
react-native startreact-native run-androidI found a solution! Please see my answer at Stackoverflow:
https://stackoverflow.com/a/59507720/6421759
It still doesn't work.
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 me.
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 me.
Worked for me too.
@fgagneten solution is a hack because it disables the CLI entirely. If you are having issues, please package your entire application into a zip and email it to me to "[email protected]". I do really want to resolve this issue, but I am having a hard time reproducing it.
We are going to ship a quick update that will replace this error message with a real, underlying error. That will help debugging and eliminate hundreds of same issues that are all different.
Duplicate of #863 that has confirmed workaround.
make sure that there's no syntax error in AndroidManifest.xml for me i make a copy past and i forget to close attribute with " "
I found a solution! Please see my answer at Stackoverflow:
https://stackoverflow.com/a/59507720/6421759
It's not right to like your own comment as it was someone else approved it.
For me, AndroidManifest.xml file was automatically generated in /andoird/app/release/ folder. After removing this, application compiled successfully.
AndroidManifest.xml
Not worked for me
Most helpful comment
make sure that there's no syntax error in AndroidManifest.xml for me i make a copy past and i forget to close attribute with " "