"找不到方法packageName()"RC1中的错误 - Flavors不编译

san*_*one 4 android android-studio

在以前版本的Android Studio中构建的项目不希望在最新的RC1中编译.

该项目使用味道,我不断收到消息:

无法在GroupableProductFlavor_Decorated上找到参数[org.XXYYZZ.apps]的方法packageName(){name = english,minSdkVersion = null,targetSdkVersion = null,renderscriptTargetApi = null,renderscriptSupportModeEnabled = null,renderscriptNdkModeEnabled = null,versionCode = null,versionName = null ,applicationId = null,testInstrumentationRunner = null,testHandleProfiling = null,testFunctionalTest = null,signingConfig = null,resConfig = null,mBuildConfigFields = {},mResValues = {},mProguardFiles = [],mConsumerProguardFiles = [],mManifestPlaceholders = {}}.

它似乎打破了第一个风味名称,因为它无法使用它的方法packageName.

Gradle版本是

dependencies {
        classpath 'com.android.tools.build:gradle:0.14.4'
    }
}
apply plugin: 'android'
...
Run Code Online (Sandbox Code Playgroud)

可能导致此错误的原因是什么?任何想法如何解决它?

car*_*ger 15

不推荐使用PackageName,RC1中使用的新Gradle插件不再支持它.使用"applicationId"而不是"packageName"属性.

此处列出的更改