Skip to content

Gradle sync error in Android Studio 3.0 with scoped module #17029

@0x5e

Description

@0x5e

Is this a bug report?

Yes

Have you read the Contributing Guidelines?

Yes

Environment

Environment:
OS: macOS High Sierra 10.13.1
Node: 8.7.0
Yarn: 1.2.1
npm: 5.4.2
Watchman: 4.9.0
Xcode: Xcode 9.1 Build version 9B55
Android Studio: 3.0 AI-171.4443003

Packages: (wanted => installed)
react: 16.0.0 => 16.0.0
react-native: 0.50.4 => 0.50.4

Steps to Reproduce

  1. react-native init example && cd example
  2. yarn add @0x5e/react-native-alipay
  3. react-native link
  4. Open Android Studio 3.0, import android folder
  5. Press Sync Project with Gradle Files button

Expected Behavior

Gradle Sync Success

Actual Behavior

Gradle Sync Failure

Missing Dependencies
Error:Unable to find module with Gradle path ':@0x5e/react-native-alipay' (needed by module 'app'.)

Reproducible Demo

react-native init example can reproduces this issue.

PS

  1. Android Studio 2.x don't have this problem.
  2. If I rename the project :@0x5e/react-native-alipay to :react-native-alipay in android/settings.gradle and android/app/build.gradle, gradle sync will success.
  3. Shall we change the module name from :@username/project-name to :@username:project-name during react-native link? See this: https://docs.gradle.org/4.2/release-notes.html#path-separator-characters-in-names-are-deprecated

Metadata

Metadata

Assignees

No one assigned

    Labels

    Platform: AndroidAndroid applications.Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions