-1

I have added aar into android studio and trying to access one of the activity from aar into my project. I am to import that activity but at the run time I am getting java.lang.NoClassDefFoundError: .

The step that I followed to add aar:

1) imported an aar using file menu option. 2) then I added that library from module setting to my project.

I am able to all the activities which are there in aar in my main project manifest merge file.

whats going wrong, guide me

Tuấn Kiệt
  • 312
  • 3
  • 13
AKASH WANGALWAR
  • 1,326
  • 1
  • 14
  • 21

1 Answers1

1

AAR Integration

  1. Add aar file in libs folder of your app (Just copy and paste)

  2. Inside build.gradle of your app module:

    a) Add following code:

    repositories {
        flatDir {
                dirs 'libs'
        }
    }
    

    b) Add aar dependency:

    compile(name: 'your-aar-filename-without-extension', ext: 'aar') 
    

After adding above dependency, Kindly Sync Project with Gradle Files.

zeeali
  • 1,524
  • 20
  • 31