Skip to content

Not able to add aar file to react-native project #15854

Closed
@hariramsvnit

Description

@hariramsvnit

I am building a react-native project for android but not able to add an aar file as a dependency.

I have followed following steps

  1. Created libs folder inside android folder and placed aar file in that.

  2. Written this in top level Gradle

     ` repositories {
        mavenCentral()
        flatDir {
          dirs 'libs'
        }
     }`
    
  3. added following line to dependencies

     `compile project(name: "xyz", ext: 'aar')`
    

And I am facing this error while building

`* What went wrong:
A problem occurred evaluating project ':react-native-abc'.
> Required keys [path] are missing from map {name=xyz, ext=aar}.`

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions