openmobilehub / omh-maps

omh-maps
Apache License 2.0
8 stars 1 forks source link

Decompiled class files instead of source code when viewing AAR library sources in Android Studio #82

Closed dzuluaga closed 1 year ago

dzuluaga commented 1 year ago

I tried to view the source code of the OMH Maps Client library in my Android Studio project by including the AAR library in my project dependencies. However, instead of seeing the original source code, I encountered decompiled class files that lack the necessary details (see snapshot).

Issue: When attempting to access the source code of the OMH Maps Client library through the AAR library in Android Studio, the decompiled class files are displayed instead of the actual source code. The decompiled classes contain comments at the header indicating that they are generated from class files and that the implementation of methods is not available.

Expected Behavior: When including the AAR library in the project and navigating to its classes in Android Studio, I expect to see the original source code with all the necessary details, such as method implementations, variable names, and comments.

Steps to Reproduce:

  1. Add the OMH Maps Client library AAR file as a dependency in an Android Studio project.
  2. Navigate to the classes provided by the OMH Maps Client library.
  3. Attempt to view the source code of any class within the library.

Actual Results: Instead of displaying the original source code, Android Studio shows decompiled class files with limited information and comments indicating that they are stub sources generated from class files.

Expected Results: When viewing the source code of the OMH Maps Client library through the AAR library in Android Studio, the original source code should be displayed, including complete method implementations, variable names, and comments.

Screen Shot 2023-05-31 at 11 05 30 AM

Anwera64 commented 1 year ago

Hey, @dzuluaga. I was trying to accomplish this the last two days by attaching the javadocs to the repositories but to no avail. After some investigation, I stumblon upon the fact that no libraries apart from the Android framework contain the source code with comments. Retrofit, Coroutines and Dagger/Hilt also show the generated stubs for their code.

So far, I haven't found a way to show the source code inside the IntelliJ IDE as requested. If you have any other ideas, you're welcome to try them out and share them with us.

dzuluaga commented 1 year ago

Dupped. Addressed by https://github.com/openmobilehub/omh-storage/issues/153.