Skip to content

@react-native-community/cli-platform-android Build failed with an exception #838

Description

@b1ngx

Environment

react-native info

yarn run v1.19.1
$ /Users/b1ng/rn/haokan/node_modules/.bin/react-native info
info Fetching system and libraries information...
System:
OS: macOS 10.15.1
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 53.23 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.12.0 Yarn: 1.19.1 npm: 6.12.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: /undefined - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.4 => 0.61.4
✨ Done in 2.66s.

react-native --version

yarn run v1.19.1
$ /Users/b1ng/rn/haokan/node_modules/.bin/react-native --version
3.0.0-alpha.7
✨ Done in 0.32s.

Description

yarn android

yarn run v1.19.1
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Script '/Users/b1ng/rn/haokan/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 182
* What went wrong:
A problem occurred evaluating script.
> 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 "react-native --help" to see a list of all available commands.
^
* 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/b1ng/rn/haokan/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 182
* What went wrong:
A problem occurred evaluating script.
> 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 "react-native --help" to see a list of all available commands.
^
* 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:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (/Users/b1ng/rn/haokan/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)
at buildAndRun (/Users/b1ng/rn/haokan/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41)
at /Users/b1ng/rn/haokan/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (/Users/b1ng/rn/haokan/node_modules/@react-native-community/cli/build/index.js:164:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Reproducible Demo

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions