Gradle complains: "TaskSelectionException: Task 'generateDebugTestSources' not found in project"

5.6k Views Asked by At

Updating Android Studio from 1.1.0 to 1.2 RC0 broke my (previously flawlessly running) project. The error message is:

TaskSelectionException: Task 'generateDebugTestSources' not found in project ':libraries:android-simple-facebook:Simple Facebook'. Some candidates are: 'generateDebugResources'.

What does that mean? And how can it be fixed? Any advice is appreciated. Thank you.

2

There are 2 best solutions below

2
David Aleksanyan On BEST ANSWER

I got this error after I renamed the project.

Solution is: Press on the "Sync Project With Gradle Files" once. After this the error will be gone. enter image description here

0
Danny Liao On

I got the same error,too. It's seems like when I update gradle to 1.3, AS missing something. I tried run ./gradlew clean in project root directory, it will install all requires and finally build success.