Amr Tharwat
Amr Tharwat

Reputation: 251

Using Gradle in Android Development

Im new to android development and ive seen some old tutorials before regarding its development on Eclipse. i recently download the new Android Studio to use for the development. However, i found something new called gradle files that are present in the projects folder along with the normal files that used to be in the project.

Everytime i try to run the app i get the following error:

" Gradle: FAILURE: Could not determine which tasks to execute. * What went wrong: Task 'assemble' not found in root project 'SampleProject'. * Try: Run gradle tasks to get a list of available tasks. "

Could anyone please explain whats the use of gradle? and do i have to use it while developing android apps?

Thank you

Upvotes: 1

Views: 227

Answers (3)

Paul Verest
Paul Verest

Reputation: 63912

Android Studio is bleeding edge (not yet beta).

For more stable solution use Eclipse with ADT, e.g. ADT-bundle http://developer.android.com/sdk/index.html

You can develop in Eclipse with ADT and run Gradle build using Nodeclipse/Enide Gradle for Eclipse (marketplace)

Some screenshots for Gradle for Eclipse:

Upvotes: 0

Paschalis
Paschalis

Reputation: 12291

In your top directory file with name build.gradle just put:

task assemble {}

You can see it in known issues here

Get started with gradle here!

Edit: Android Studio 0.2.1 solves this error: http://tools.android.com/recent/androidstudio021released

Upvotes: 1

Xavier Ducrohet
Xavier Ducrohet

Reputation: 28539

Version 0.2.1 of Studio was just released and provides a better error. You should upgrade and see what happens, but it's likely that your project has another problem that should be fixed instead of randomly adding a task that shouldn't be added.

Upvotes: 1

Related Questions