cli: Gradle sync fail - ERROR: Text must not be null or empty
Env. Info
System:
OS: macOS Mojave 10.14.4
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Memory: 1.20 GB / 16.00 GB
Shell: 5.3 - /bin/zsh
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.12.3 - /usr/local/bin/yarn
npm: 6.10.2 - ~/.nvm/versions/node/v10.13.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.4, macOS 10.14, tvOS 12.4, watchOS 5.3
Android SDK:
API Levels: 26, 28, 29
Build Tools: 28.0.3, 29.0.2
System Images: android-29 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 10.3/10G8 - /usr/bin/xcodebuild
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.2 => 0.61.2
Current cli version.
Andrei ~ desktop ReactConf native_navigation ✚ 1 … 1 yarn list @react-native-community/cli yarn list v1.12.3 warning Filtering by arguments is deprecated. Please use the pattern option instead. └─ @react-native-community/cli@3.0.0-alpha.2 ✨ Done in 0.57s.
Description
I’m able to build and run on device using npx react-native run-android
, however, when I open Android Studio I’m unable to sync gradle.
Reproducible Demo
Clean init with npx react-native init FreshApp
Caused by: org.gradle.internal.exceptions.LocationAwareException: Script '/Users/Andrei/desktop/ReactConf/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 191
A problem occurred evaluating settings 'ReactConf'.
Full log file from Gradle failure:
Note
I noticed some other issues related to this, I tried to going over them and to find a fix, but I failed so far. Most seem related to a Monorepo structure, which is not my case.
Any clues how I can fix this?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 19 (11 by maintainers)
@thymikee this PR works for me. Thank you! 👍
There seem to be a lot of issues on this regression. I’d suggest moving fast on this fix.
Here’s a PR solving this issue: https://github.com/react-native-community/cli/pull/824. Please test in your environments.