question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Gradle sync fail - ERROR: Text must not be null or empty

See original GitHub issue

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:

idea.log

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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
robertyingcommented, Oct 27, 2019

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

1reaction
thymikeecommented, Oct 25, 2019

Here’s a PR solving this issue: https://github.com/react-native-community/cli/pull/824. Please test in your environments.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found