nayakasu
nayakasu

Reputation: 969

Android library project debugging quickly

I am developing a library project. Right now my debugging process is something like this :

As you can see it's a long process and takes a lot of time to debug library. What is the proper way for library development using android studio?

Upvotes: 0

Views: 1540

Answers (2)

Vikas Tiwari
Vikas Tiwari

Reputation: 499

You can do this way:

  • Add library module in same project directory like app folder : File-> new-> new module -> Android Library.
  • Add your library module name in setting.gradle (eg. include ':app',':xyz') : should be added automatically
  • Right click on your main app folder-> open module settings -> add your library as dependency to "app" (it's under module dependency).
  • Go to build.gradle file of your main project, add module like compile project (':xyz')

No need to create aar , just make changes in lib module and Run your main project and debug it .

Hope this will help you !

Upvotes: 2

Jokester
Jokester

Reputation: 5617

I would include a demo-app project in parallel to library project:

//  /settings.gradle
include ':app', ':lib'

//  /app/build.gradle
depencency {
    compile project(':lib')
}

Upvotes: 0

Related Questions