Add androidx source code to Android Studio project for debugging

牧云@^-^@ 提交于 2020-02-23 03:38:28

问题


I want to to add the androidx source code to my Android Studio project instead of using the provided library (implementation 'androidx.core:core-ktx:1.1.0'). Using the provided library I can only view the source code (it's read only during debugging), but I need to modify it for testing purposes.

So how can I add the androidx source code to Android Studio so I can edit it?


回答1:


These repositories are usually being accessed with repo -
but for the sake of simplicity, git would also be supported:

git clone --branch androidx-master-dev https://android.googlesource.com/platform/frameworks/support /home/android/androidx-master-dev

Android Studio also supports git; the repository URL to check out would be https://android.googlesource.com/platform/frameworks/support and the branch is to select is eg. androidx-master-dev;. However, manually adding the library modules you need might be better.

Only the pre-built artifacts have version numbers, not the source-code. And it might only be known internally, which commit equals which version number; it doesn't seem to be publicly documented. See Android CI and Android Code Search; it says nothing about any version numbers there either.



来源:https://stackoverflow.com/questions/60238922/add-androidx-source-code-to-android-studio-project-for-debugging

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!