I tried to add a dependency to my application and I accidentally changed the wrong build.gradle file and now my application no longer builds correctly.
That's my fault:
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
I tried to implement the code that exists here , but I ended up working in Android Studio because I am new to gradle.
The files I edited were .idea / gradle.xml and build.gradle, which I include below:
build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.1.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }
gradle.xml:
<?xml version="1.0" encoding="UTF-8"?> <project version="4"> <component name="GradleSettings"> <option name="linkedExternalProjectsSettings"> <GradleProjectSettings> <option name="distributionType" value="DEFAULT_WRAPPED" /> <option name="externalProjectPath" value="$PROJECT_DIR$" /> <option name="modules"> <set> <option value="$PROJECT_DIR$" /> <option value="$PROJECT_DIR$/app" /> </set> </option> </GradleProjectSettings> </option> </component> </project>
I tried to get as many default files as possible, but ended up exacerbating the problem and I can no longer build my project.
In addition, I am using Android Studio 1.1.0, which is featured in the latest update.
Thanks in advance, and if I need to provide more information, just let me know.
source share