Android Api 24 can't find sources
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.
I had the same problem with API 25 and Android Studio 2.2
Try the following:
Close Android Studio.
Open
~/Library/Preferences/AndroidStudio2.2/options/jdk.table.xml
orC:\Users{USER_NAME}.AndroidStudio2.2\config\options\jdk.table.xml
Note the Android Studio version in the pach.
Locate
<sourcePath>
for Android API 24 Platform and for previous one. You can look that<sourcePath>
for problem API hasn't second<root>
element with url.Investigate path of sources, check that sources was really installed.
Copy
<root>
from another<sourcePath>
and set correct url. It will be similar to<sourcePath> <root type="composite"> <root type="simple" url="file://$USER_HOME$/Library/Android/sdk/sources/android-24" /> </root></sourcePath>
Save the file and start Android Studio
To get the newest Android API's (SDK Platform)
Make sure you update the
Android SDK Tools
to the latest version in theAndroid SDK Manager
first.