Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - Gradle

I'm trying to use the newest version of gradle for android studio which is 1.3.0.

http://android-developers.blogspot.ro/2015/07/get-your-hands-on-android-studio-13.html

Unfortunately I have problems while trying to update the gradle version. Previous version of gradle was 1.2.3 and now wanted to update this to 1.3.0.

I'm getting the following error:

Error:Cannot access first() element from an empty List

I have also updated to Android Studio 1.3 and i'm currently using the following build tools:

buildToolsVersion "23.0.0 rc3"

I tried deleting gradle and .gradle dirs from my project and also the .gradle dir from user home dir, but with no success.

Even I tried going to File -> Invalidate caches/restart but still no solution.

like image 661
box Avatar asked Aug 07 '15 11:08

box


People also ask

What is the Gradle in Android Studio?

Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.

Is Gradle installed with Android Studio?

Android Studio comes with a working installation of Gradle, so you don't need to install Gradle separately in that case. In order to create a new build or add a Wrapper to an existing build, you will need to install Gradle according to these instructions.

What is Gradle used for?

Gradle makes it easy to build common types of project — say Java libraries — by adding a layer of conventions and prebuilt functionality through plugins. You can even create and publish custom plugins to encapsulate your own conventions and build functionality.

Does Android require Gradle?

By default, Android projects are handled by the Gradle build system. If you create a new project in Android studio, the Gradle build scripts are automatically created. Android studio provides the Gradle runtime, hence no additional installation is required.


1 Answers

I had the same issue using gradle 1.3.1 and buildtools 23.0.1. I found that it was due to an old version of bintray-release. This issue is fixed in 0.3.4+.

classpath 'com.novoda:bintray-release:0.3.4'
like image 199
Justin Fiedler Avatar answered Sep 23 '22 02:09

Justin Fiedler