user3806331 user3806331 - 15 days ago 7
Android Question

Android Api 24 can't find sources

I have this grade file:

//ext.support_library_version = '24.0.0'

android {
compileSdkVersion 24
buildToolsVersion '24.0.0'

defaultConfig {
applicationId "---"
minSdkVersion 21
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
...
}


But then when i try to open any android related class, it says i haven't got sources for api24, even tho the
buildToolsVersion '24.0.0'
is installed. Any idea why?

Answer

Sources for Android N are not yet published and not available for installation in the SDK manager. When the source package becomes available, you need to install it separately, as with any previous SDK version.


Update 2016-08-24: The Android API 24 sources are now available in the SDK manager.

After downloading you might need this trick to refresh the SDK installation.