Android Studio debugging dependency project

2,859 views
Skip to first unread message

Przemek Jakubczyk

unread,
Jul 11, 2013, 9:12:31 AM7/11/13
to adt...@googlegroups.com
Hi,

has anyone encourage problem with debugging in Android Studio using library projects?

My project structure is a follows:
/
-- lib-project
-- my-app

in settings.gradle I have

include ':lib-project, ':my-app'

and of course my-app gradle as in dependencies

compile project(':lib-project')

I think I don't have explain why I divided project into smaller parts but I'd like to use debugger to check if everything goes according to flow. Android Studio when comes to classes from library project doesn't show sources ?!

Do you know any solution for Android Studio? or maybe always attach sources to aar - if so how it's possible?

Thanks,
Przemek

Przemek Jakubczyk

unread,
Jul 11, 2013, 9:40:05 AM7/11/13
to adt...@googlegroups.com
Maybe I've add one more discover here. Normally in Java project when Intellij imports whole structure it reads

compile project(':lib') 

as real Idea Module, so you can easily manipulate sources and see them while debugging.

Unfortunately Android Studio interprets compile project in a different way ... When checking project information I see that in dependencies that all my library projects are .aar files ! not a Idea Module!  

Question comes, when AS/gradle plugin is going to support it?

Cheers

Xavier Ducrohet

unread,
Jul 11, 2013, 12:13:07 PM7/11/13
to adt...@googlegroups.com
This is a known limitation which will be fixed very soon.


--
You received this message because you are subscribed to the Google Groups "adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

Xavier Ducrohet

unread,
Jul 12, 2013, 1:22:56 PM7/12/13
to adt...@googlegroups.com
This is now fixed in Studio 0.2.0 and Gradle 0.5.0.

The model exported by Gradle now properly provides information about libraries that are coming from modules versus libraries coming from aar files.


Xavier Ducrohet

unread,
Jul 12, 2013, 1:23:01 PM7/12/13
to adt...@googlegroups.com
You can already do that through the DSL, but this is not going to help in Studio. You want module references, not a reference to a jar file containing static sources.


On Thu, Jul 11, 2013 at 11:59 PM, Przemek Jakubczyk <pjaku...@gmail.com> wrote:
I think the best option would it be if android-library plugin have option to export sources and javadoc along with compiled classes. 

The same pattern as it is in maven deploy mechanism.

Przemek Jakubczyk

unread,
Jul 19, 2013, 5:56:28 AM7/19/13
to adt...@googlegroups.com
Check. It works.

Many thanks
Reply all
Reply to author
Forward
0 new messages