I already checked this post: How to load dependency sources for a Gradle project in IDEA?
But that did not work for me. Perhaps this is because they belong to IntelliJ Idea, and I have a problem with Android Studio.
I tried to add
apply plugin: 'idea' idea { module { downloadJavadoc = true downloadSources = true } }
Both for the root build.gradle file (I'm in the multiproject setup) or in the build.gradle file of the application.
My Gradle file application:
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' } } repositories { mavenCentral() } dependencies { compile files('libs/android-support-v4.jar') compile 'com.nostra13.universalimageloader:universal-image-loader:1.8.4' } android { compileSdkVersion 17 buildToolsVersion "17.0.0" defaultConfig { minSdkVersion 7 targetSdkVersion 16 } }
Then, in Android Studio, when I click on any method from the universalimageloader library, I get to the screen, saying that there are no sources. If I click the "Attach" button, it will show: 
As you can see, only the lib jar was loaded into the Gradle cache. * -Sources.jar or * -javadoc.jar files not loaded. I cleaned up the project, deleted the .gradle folder to make it boot again from maven. Bad luck.
I double-checked that the downloaded generic image contains the sources and javadoc available in maven, so this is not a problem.
Thank!
android android-studio maven gradle
Monitus Jul 02 '13 at 13:14 2013-07-02 13:14
source share