【问题标题】:Can't download source code of any Android library无法下载任何 Android 库的源代码
【发布时间】:2019-10-16 11:30:50
【问题描述】:

我正在尝试使用“下载源”按钮下载任何 Android 库的源代码,但每次都会出现 gradle 任务错误。有什么办法可以解决吗?

10:19:06 PM: Executing task ':app:DownloadSources --stacktrace'...

Executing tasks: [:app:DownloadSources]


FAILURE: Build failed with an exception.

* What went wrong:
Task 'DownloadSources' not found in project ':app'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.execution.TaskSelectionException: Task 'DownloadSources' not found in project ':app'.


* Get more help at https://help.gradle.org

BUILD FAILED in 0s
10:19:06 PM: Task execution finished ':app:DownloadSources --stacktrace'.

【问题讨论】:

标签: android gradle


【解决方案1】:

好吧,我找到了答案:我正在使用被 AndroidX 取代的 android.support 库。 您需要将项目迁移到 AndroidX 或使用低于 28 的 API

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-11-24
    • 1970-01-01
    • 2021-08-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-27
    • 2021-12-01
    相关资源
    最近更新 更多