3
votes

I'm currently using React Native with React Navigation and React Native Maps. After I changed from Expo to React Native (to work with Native code) I kept getting this error after installing the dependencies for React Native Maps & React Navigation. Here is the error I got.

warn The following packages to use the deprecated "rpm" config that will stop working from next release:

- react-native-maps: https://npmjs.com/package/react-native-maps Please notify their maintainers about it. You can find more details at https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide. info JS server already running. info Installing the app...

FAILURE: Build failed with an exception.

  • Where: Script '/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 195

  • What went wrong: A problem occurred evaluating settings 'project'.

    Unable to determine the current character, it is not a string, number, array, or object

    The current character read is 'T' with an int value of 84 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0 TypeError: Cannot read property '_text' of undefined at SAXParser.parser_text [as ontext] (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/lib/xmldoc.js:235:39) at emit (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:639:35) at closeText (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:649:26) at emitNode (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:643:26) at openTag (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:839:5) at SAXParser.write (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:1289:15) at new XmlDocument (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/lib/xmldoc.js:199:15) at readManifest (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/config/readManifest.js:44:10) at Object.projectConfig (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/config/index.js:60:46) at Object.get project [as project] (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli/build/tools/config/index.js:129:61) ^

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • Where: Script '/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 195

  • What went wrong: A problem occurred evaluating settings 'project'.

    Unable to determine the current character, it is not a string, number, array, or object

    The current character read is 'T' with an int value of 84 Unable to determine the current character, it is not a string, number, array, or object line number 1 index number 0 TypeError: Cannot read property '_text' of undefined at SAXParser.parser_text [as ontext] (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/lib/xmldoc.js:235:39) at emit (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:639:35) at closeText (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:649:26) at emitNode (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:643:26) at openTag (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:839:5) at SAXParser.write (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:1289:15) at new XmlDocument (/Users/blainefurman/Documents/sample2/project/node_modules/xmldoc/lib/xmldoc.js:199:15) at readManifest (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/config/readManifest.js:44:10) at Object.projectConfig (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/config/index.js:60:46) at Object.get project [as project] (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli/build/tools/config/index.js:129:61) ^

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1s

at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:137:41)
at then.result (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:103:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

I tried to see it was a linking error (but it wasn't) and all my dependencies, to my understanding, are set up correctly.

I'll take any suggestions at this point because I'm completely stumped.

Also, sorry for messiness, first time on stack overflow (and the image is linked below).

click here for image

2

2 Answers

0
votes

Not sure if this will help. I've never used expo and ejected, but you are getting a similar error to this: https://github.com/nfarina/xmldoc/issues/19

Can you try updating this package and rerunning:

https://github.com/nfarina/xmldoc

0
votes

Try upgrading the xmldoc/maps version for now :

I faced same issue with firebase messaging version and solved it like below.

Replace this in app/build.gradle in dependencies

from

implementation of old version of xmldoc & maps

to

implementation to new version of xmldoc & maps

let me know if it helps.