首先,确保你已经下载完成了,
然后,在C:\Users\xxx\.AndroidStudio2.1\config\options这里找到jdk.table.xml
打开它

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<jdk version="2">
<name value="Android API 24 Platform" /> //找到对应的版本
<type value="Android SDK" />
<version value="java version "1.8.0_91"" />
<homePath value="D:\android-studio-sdk" />
<roots>
<annotationsPath>
<root type="composite">
<root type="simple" url="jar://$APPLICATION_HOME_DIR$/plugins/android/lib/androidAnnotations.jar!/" />
</root>
</annotationsPath>
<classPath>
<root type="composite">
<root type="simple" url="jar://D:/android-studio-sdk/platforms/android-24/android.jar!/" />
<root type="simple" url="file://D:/android-studio-sdk/platforms/android-24/data/res" />
</root>
</classPath>
<javadocPath>
<root type="composite">
<root type="simple" url="file://D:/android-studio-sdk/docs/reference" />
</root>
</javadocPath>
<sourcePath> //源码在這里
<root type="composite">
//把路径填进去,重开AndroidStudio就ok了
<root type="simple" url="file://D:/android-studio-sdk/sources/android-24" />
</root>
</sourcePath>
</roots>
<additional jdk="1.8" sdk="android-24" />
</jdk>