Android平台API级别的源代码

时间:2023-01-19 00:02:33

Suppose, I've installed a new API level, say 18, and want to look at the code of the package responsible for SMS messaging at this level. I have two questions:

假设,我已经安装了一个新的API级别,比如18,并希望在此级别查看负责SMS消息传递的软件包的代码。我有两个问题:

  • Is there a method to do this right in Android Studio?

    有没有一种方法可以在Android Studio中执行此操作?

  • Where are the sources in my OS X file system (to look at it from console)?

    我的OS X文件系统中的源代码在哪里(从控制台查看)?

1 个解决方案

#1


0  

If you are using a class in Android Studio, you can right click, and Go To Declaration. Then from that class file you can right click on the name of the file in the tab at the top, and Copy Path. That should show you right where the file is located.

如果您在Android Studio中使用课程,则可以右键单击,然后转到声明。然后,从该类文件中,您可以在顶部的选项卡中右键单击文件的名称,然后单击“复制路径”。这应该会显示文件所在的位置。

For me SmsManager ends up being - /Users/username/Library/Android/sdk/sources/android-22/android/telephony/SmsManager.java

对我来说,SmsManager最终成为 - /Users/username/Library/Android/sdk/sources/android-22/android/telephony/SmsManager.java

#1


0  

If you are using a class in Android Studio, you can right click, and Go To Declaration. Then from that class file you can right click on the name of the file in the tab at the top, and Copy Path. That should show you right where the file is located.

如果您在Android Studio中使用课程,则可以右键单击,然后转到声明。然后,从该类文件中,您可以在顶部的选项卡中右键单击文件的名称,然后单击“复制路径”。这应该会显示文件所在的位置。

For me SmsManager ends up being - /Users/username/Library/Android/sdk/sources/android-22/android/telephony/SmsManager.java

对我来说,SmsManager最终成为 - /Users/username/Library/Android/sdk/sources/android-22/android/telephony/SmsManager.java