Gradle sync fail - ERROR: Text must not be null or empty
See original GitHub issueEnv. 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?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:19 (11 by maintainers)
Top Results From Across the Web
React Native build error: Text must not be null or empty
Looks like you're missing a getAppName function in your build.gradle . Something like ext.getAppName = {suffix = '' -> 'MyAppName' + suffix} ....
Read more >Learning the Basics - Gradle User Manual
If Gradle finds a module descriptor in a particular repository, it will attempt to download all of the artifacts for that module from...
Read more >Known issues with Android Studio and Android Gradle Plugin
If Studio doesn't start after an upgrade, the problem may be due to an invalid Android Studio configuration imported from a previous version...
Read more >Dolphin: Project sync fails with "null" message [247244491]
Try to Sync project, and you'll get null message and failure. It seems that project unloading becomes useless with this bug present.
Read more >Gradle Sync fails without any message what has happened ...
After I upgrade Intellij to 2020.1, the gradle plugin stoped working. Gradle command works fine in command line, by not working anymore from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@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.