【发布时间】:2015-02-02 20:38:49
【问题描述】:
我目前正在尝试将 Android Studio 更新到 1.0.0-RC。这似乎需要 gradle Android 插件 1.0.0-rc1。更新后,我开始出现以下错误:
`Could not find property 'processManifest' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated@b9da89c.`
经过一番挖掘,processManifest 似乎是在0.14.3 version 中删除的已弃用属性之一。知道新的属性名称是什么吗?新版本没有更新相同的用户指南,所以我找不到任何文档。
编辑:这是需要该属性的代码。我使用它将一些构建时值注入清单:
applicationVariants.all { variant ->
variant.processManifest << {
def manifestOutFile = variant.processManifest.manifestOutputFile
def newFileContents = manifestOutFile.getText('UTF-8')
.replace("{GOOGLE_MAPS_KEY}", variant.buildType.ext.google_maps_key)
manifestOutFile.write(newFileContents, 'UTF-8')
}
}
【问题讨论】:
标签: android gradle android-studio android-gradle-plugin build.gradle