我想学习如何最好地使用Android Studio,但我仍然缺乏经验,特别是在使用Gradle构建时.
执行任务:[清理]
依赖于打包来定义主工件的扩展已被弃用,并计划在Gradle 2.0中删除:app:clean UP-TO-DATE
建立成功
即使一切正常,我也希望避免使用弃用的方法;
我声明我看到了这个问题,并尝试理解弃用消息,但现在我的重点是理解在Android Studio上构建APK以及如何将手放在由此IDE创建的项目中.
是否可以通过更改项目中的某些内容(配置文件或工件)来修复它?
PS:我在"Android Studio(预览版)0.4.3 build 133"上,在项目中有两个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:+'
}
Run Code Online (Sandbox Code Playgroud)
2)〜/ AndroidStudioProjects/MyAppProject/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. …Run Code Online (Sandbox Code Playgroud) 我已经升级到Android Studio 0.5.9并且总是收到这些警告:
Configuration on demand is an incubating feature.
Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0
Run Code Online (Sandbox Code Playgroud)
我有什么关于它的吗?如果没有,我可以禁用它们吗?