jackfren jackfren - 7 months ago 61
Android Question

Android Studio: how to attach Android SDK sources?

How can I attach Android SDK sources to Android Studio?

When I open one of the Android classes, the "Sources not found" window with "Attach Sources" option doesn't appear.

What is the other way to do this?


Open your sdk manager from toolbar menus and download the "Sources for Android SDK" for the API level defined in your build.gradle file like

compileSdkVersion 19 // compile with API level 19

Nothing else needs to be done.

Note : Sources for SDK is available only for API levels 14 and above.