Android的工作室:如何安装Android的SDK源?工作室、Android、SDK

2023-09-13 01:49:57 作者:冰川英雄的快乐

我如何可以将Android的SDK源到Android工作室?

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?

推荐答案

从工具栏菜单打开SDK管理器和下载资源为Android SDK中的为您build.gradle文件中定义如

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.

注意:源的SDK仅适用于API等级14以上

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