Personal testing is feasible. When viewing the source code in Android Studio, Source for ‘Android API xxx Platform’ not found appears.
Personal testing is feasible, the solution is Source for ‘Android API xxx Platform’ not found when viewing the source code in Android Studio
As for the problem in the title, the reason is that the corresponding version of the source code file cannot be found in the SDK source code directory. The solution is generally to download the source code file of the corresponding version.
This is mainly another situation. Every time Google releases a new version of Android, the corresponding source code is not yet available for download (usually it will be available at some time after the official version is released). What to do at this time?
The idea is to use the source code of the old version first.
Here we take Android API 34 as an example. , forcibly copy the source code of Android 33 and use it as API 34.
The steps are as follows:
-
Go to the Android SDK directory (sdk/sources) and copy android-33 and modify it to android-34.
-
Modify the
package
andsource.properties
files in android-34 and change all 33 in them to 34
-
Modify the
jdk.table.xml
file and change the paths of all Android API 34 Platform’s tags to the paths of android-34. The file path is:
C:/Users/.AndroidStudio{version}/config/options/jdk.table.xml
- Restart Android Studio and you can see the source code.
Author: SharpCJ
Author’s blog: http://joy99.cnblogs.com/
The copyright of this article belongs to the author and the blog park. Reprinting is welcome, but this statement must be retained without the author’s consent, and a link to the original text must be provided in an obvious position on the article page.