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'
Gradle is a general-purpose build toolGradle 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.
CompileOnly ( deprecated version — provided) Gradle adds the dependency to the compile classpath only ( that is it is not added to the build output). This is useful when you're creating an Android module and you need the dependency during compilation, but it's optional to have it present at runtime.
The Gradle build system in Android Studio makes it easy to include external binaries or other library modules to your build as dependencies. The dependencies can be located on your machine or in a remote repository, and any transitive dependencies they declare are automatically included as well.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With