There are many files under .idea/libraries with prefix Gradle__. I know these files contains the config of all the dependencies declared in build.gradle, including jar, javadoc and sources location.
The problem is when I open my project in Android Studio 4.2, all the third party dependency source file and javadoc is invisible. What I can see is only the class files. But when I open the same project in InteliJ IDEA, everything is right.
The only difference is that Gradle__ strted files gerated by InteliJ IDEA contains source file path but Android Studio does not.
The problem occurs after I delete my ~/.gradle fold.
Gradle__com_squareup_okhttp3_okhttp_3_12_12.xml generated by Android Studio:
<component name="libraryTable">
<library name="Gradle: com.squareup.okhttp3:okhttp:3.12.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.12.12/d3e1ce1d2b3119adf270b2d00d947beb03fe3321/okhttp-3.12.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.12.12/2424f05075bc08b19d8aa06b7d88250e2e068ce3/okhttp-3.12.12-sources.jar!/" />
</SOURCES>
</library>
</component>
Gradle__com_squareup_okhttp3_okhttp_3_12_12.xml generated by InteliJ IDEA:
<component name="libraryTable">
<library name="Gradle: com.squareup.okhttp3:okhttp:3.12.12">
<CLASSES>
<root url="jar://$USER_HOME$/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.12.12/d3e1ce1d2b3119adf270b2d00d947beb03fe3321/okhttp-3.12.12.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES/>
</SOURCES>
</library>
</component>
So, is there any preference determines how the files is generated? Or is it a bug of Android Studio?