Skip to content

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

@AndreiCalazans

Description

@AndreiCalazans

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/[email protected]
✨ 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions