22

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

BUILD SUCCESSFUL

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 'com.android.support:appcompat-v7:+'
}

2) ~/AndroidStudioProjects/MyAppProject/build.gradle

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

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.8.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

and one settings.gradle

~/AndroidStudioProjects/MyAppProject/settings.gradle

include ':app'
Community
  • 1
  • 1
Franco Rondini
  • 10,841
  • 8
  • 51
  • 77
  • 1
    Can you include the build.gradle file from the module that's giving you this error? I think you only included the one from your top-level project, which has some global boilerplate stuff. – Scott Barta Feb 02 '14 at 15:50
  • @Scott Barta thanks to your comment I realize that I have more than one **build.gradle**. I edit the question to adapt it to your suggestion. – Franco Rondini Feb 02 '14 at 17:25
  • I get this is AS 0.5.1 – cja Mar 13 '14 at 12:38

1 Answers1

17

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 https://code.google.com/p/android/issues/detail?id=65501 about this.

Scott Barta
  • 79,344
  • 24
  • 180
  • 163
  • 4
    How to solve this issue is discussed here: http://forums.gradle.org/gradle/topics/jhuxhorn_googlemail_com-zal6c For now, no solution, the warning is said to a bug – Noah Mar 08 '14 at 01:06