1

Our project use an built-in house library that I'm trying to add some log to see what happening there (Rx debugging hell!).

What I have did actually is that I attached the source code to the library, hence I expect to be able to edit the source code, but I couldn't.

I tried to unlock the file through the lock/unlock icon but it doesn't seem to be clickable.

enter image description here

The source include those folders :

/Users/abdellah/dev/job/project/projects/sdk /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/build/generated/source/apt/stg/release /Users/abdellah/dev/job/project/projects/sdk/ecoproj-sdkm-sdk/build/generated/source/buildConfig/int1/release /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/build/generated/source/buildConfig/stg/release /Users/abdellah/dev/job/projectsdk/projects/sdk/proj-sdk/build/generated/source/r/int1/release /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/build/generated/source/r/stg/release /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/src/androidTest/java /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/src/debug/java /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/src/main/java /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/src/release/java /Users/abdellah/dev/job/project/projects/sdk/proj-sdk/src/test/java /Users/abdellah/dev/job/project/projects/sdk/sdk/build/generated/source/buildConfig/int1/release /Users/abdellah/dev/job/project/projects/sdk/sdk/build/generated/source/r/int1/release /Users/abdellah/.gradle/caches/modules-2/files-2.1/com.project.projsdk/proj-sdk-stg/0.0.81/b8fca390c41676ddd5fc5ba8cb8ef/proj-sdk-stg-0.0.81-sources.jar

Community
  • 1
  • 1
TooCool
  • 10,598
  • 15
  • 60
  • 85

1 Answers1

2

Adding source to libraries it's for debugging and documentation purposes.

See How to edit library source files on NetBeans? .

If you want to edit the source code, copy the source code to your project and remove the reference to the library.

Kujoen
  • 173
  • 1
  • 8
  • The problem is that when I do this I got several gradle errors (config stuff) – TooCool Feb 08 '18 at 10:48
  • You've mentioned the lib is built in-house. If so, do you have access to the original Project ? If so, is it an Android project ? – Kujoen Feb 08 '18 at 10:54
  • Then try making your changes to the original project and check out https://stackoverflow.com/questions/21712714/how-to-make-a-jar-out-from-an-android-studio-project on how to get it back as a library into your project. – Kujoen Feb 08 '18 at 10:57
  • The jar contains compiled byte-code aka the .class files. To change these, you can either recompile your original source (which you have), or use some kind of editor like this guy was trying to do : https://stackoverflow.com/questions/38214462/java-how-can-i-edit-a-class-file?rq=1 . The sources you attach to your library are not compiled when you compile your project. They are simply there for debugging/decoumentation. – Kujoen Feb 08 '18 at 11:17