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

android-gradle-plugin, android-studio, deprecated, gradle

Solution

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.

Problem

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' ```

Original source

Related problems