2

I am trying to download source code of any Android library using "Download Sources" button, but gradle task error occurs every time. Are there any ways to fix it?

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'.
Zoe
  • 27,060
  • 21
  • 118
  • 148
  • maybe duplicated: https://stackoverflow.com/questions/17426628/how-to-make-android-studio-download-dependencies-sources-and-javadoc – fangzhzh May 30 '19 at 19:46
  • @fangzhzh Unfortunately these answers are outdated, and none of them can help to resolve this issue – Aleksei Litvin May 30 '19 at 21:03

1 Answers1

-1

Well, I've found an answer: I am using android.support library which is replaced by AndroidX. You need to migrate your project to AndroidX or use API lower than 28