小编Ste*_*nec的帖子

如何解决项目中找不到的''generateDebugSources'错误?

我试图向我的应用程序添加依赖项,我不小心修改了错误的build.gradle文件,现在我的应用程序不再正确构建.

这是我的错误:

Error:FAILURE: Build failed with an exception.

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

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Run Code Online (Sandbox Code Playgroud)

我试图实现这里存在的代码,但我最终在Android Studio中破坏了东西,因为我是gradle系统的新手.

我编辑的文件是.idea/gradle.xml和build.gradle,我在下面包括:

的build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath …
Run Code Online (Sandbox Code Playgroud)

android android-studio android-gradle-plugin

14
推荐指数
3
解决办法
2万
查看次数