本文介绍了android.dexOptions.incremental属性已弃用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当尝试运行gradle build时,我在Android Studio 2.2中收到以下警告:

When trying to run gradle build, I get following warning in Android Studio 2.2:

警告:不推荐使用android.dexOptions.incremental属性,它对构建过程没有影响.

Warning:The android.dexOptions.incremental property is deprecated and it has no effect on the build process.

在这里的build.gradle文件中,我声明了dexOptions

In build.gradle file here I have declare dexOptions

dexOptions {
   incremental true
   jumboMode = true
}

如果不建议使用,则此属性的替代选项是什么.

If it is deprecated then what is the alternate option of this attribute.

推荐答案

默认情况下,incremental在2.1.0-rc1(2016/4/22)或更高版本中启用Java编译.因此在build.gradle文件中声明它是多余的.

By default incremental is turned on Java compilation in 2.1.0-rc1 (2016/4/22) or later. So its redundant to declare it in build.gradle file.

这篇关于android.dexOptions.incremental属性已弃用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 18:07