How to add source + javadoc for android-support-v7?
android, android-support-library
Solution
I was able to attach the source based on advice from How do I attach the Android Support Library source in Eclipse?.
Here's what I did:
First, clone the source repository and get whatever version corresponds to the released library (which I guessed):
- git clone https://android.googlesource.com/platform/frameworks/support
- cd support
- git checkout android-4.3.1_r1
Next, in Eclipse:
- Right-click project and choose Properties.
- Select Java Build Path
- Select the Libraries tab
- Add External JARs > YourProject/libs/android-support-v7-appcompat.jar (I know your project had already referenced to it but don't worry, just add it again).
- Expand jar and attach Source to the External Jar: WhereverYouHaveTheSource/support/appcompat
- Switch to the "Order and Export" tab, move the external jar above the "Android Dependencies"
Problem
I added to my project support library android-support-v7-appcompat, but I can't add source and javadoc for it. I downloaded https://android.googlesource.com/platform/frameworks/support/+/master package with source and in Eclipse I set Source attachment to v7/appcompat/, but it doesn't work. Can someone help me? E: my solution is, I have two projects in Eclipse "android-support-v7-appcompat" (original lib from android-sdk\extras\android\support\v7\appcompat) and "android-support-v7-appcompat-src" (src from android.googlesource.com) and when I compile release version, so I used original lib and for debug I used src from googlesource.com. PS: sorry for my english