Gradle deprecation "Relying on packaging to define the extension of the main artifact..." in Android Studio project can be fixed?

I'd like to learn how to use Android Studio at the best, but I still have limited experience especially in building with Gradle.

Executing tasks: [clean]

Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0 :app:clean UP-TO-DATE


Even if everything works I would like to avoid using deprecated methods;

I state that I see this question and tried to understand the deprecation message but fairly the focus for me now is understanding building APK on Android Studio and how to put hands in a project created by this IDE.

Is it possible to fix-it by changing something (configuration files or artifacts) in the project?

PS: I'm on "Android Studio (preview) 0.4.3 build 133" and in the project there is two build.gradle:

1) ~/AndroidStudioProjects/MyAppProject/app/build.gradle

apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.1"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

dependencies {
    compile ''

2) ~/AndroidStudioProjects/MyAppProject/build.gradle

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

buildscript {
    repositories {
    dependencies {
        classpath ''

allprojects {
    repositories {

and one settings.gradle


include ':app'


This appears to be a bug in the Android Gradle plugin and not something you're doing wrong; I see it coming up any time you include a dependency in one of your modules even if it's specified correctly. This warning isn't anything to worry about.

I've filed about this.

Need Your Help

Add newlines to a text resource in Android?

android layout dialog resources textview

I have a custom Dialog that contains only a TextView to display some text in my application. The documentation lists that only the b, i, u, tt, big, small, sup, sub, and strike tags are supported....

MySQL Wildcards * and %

sql mysql

What is the difference between % and * wildcards in MySQL?