简体   繁体   中英

Gradle complains: “TaskSelectionException: Task 'generateDebugTestSources' not found in project”

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.

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. 在此输入图像描述

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM