从Android Studio 3.2.1更新到3.3.1后,我看不到/更改构建变体,它显示5个连字符

时间:2019-02-20 11:45:30

标签: android android-studio android-studio-3.3

我能够在Android Studio v3.2.1中将构建变体更改为devDebug,devRelease,playStoreDebug,playStoreRelease,并且在更新至v3.3.1之后,我无法更改构建变体参考图像Image_In_Android_studio_3.3.1

在将问题发布到此处之前,我尝试了以下步骤:- 1.清理项目/重建/使缓存无效并重新启动项目 2.重新克隆存储库(因为它与现有存储库不兼容)。

  • 已更新-“ classpath'com.android.tools.build:gradle:3.3.1'” 根gradle文件和“ distributionUrl = https://services.gradle.org /distributions/gradle-4.10.1-all.zip“ 在gradle-wrapper.properties中

build.gradle版本1

signingConfigs {
release {
    storeFile file("$project.rootDir/xyz-keystore-release.jks")
    storePassword “xyzzy”
    keyAlias "xyzzy"
    keyPassword "xyzzy"
}}

buildTypes {
release {
    minifyEnabled false
    shrinkResources false
    debuggable true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    signingConfig signingConfigs.release
}}

productFlavors {
playStore {
    applicationId myApplicationId
    manifestPlaceholders = [crashlyticsEnabled: true]
}

dev {
    applicationId myApplicationId + ".dev"
    manifestPlaceholders = [crashlyticsEnabled: false]
}}

build.gradle版本2

signingConfigs {
release {
    storeFile file("$project.rootDir/xyz-keystore-release.jks")
    storePassword “xyzzy”
    keyAlias "xyzzy"
    keyPassword "xyzzy"
}

debug {
    storeFile file("$project.rootDir/xyz-debug.keystore")
    storePassword "xyzzy"
    keyAlias "xyzzy"
    keyPassword "xyzzy"
}}

buildTypes {
release {
    minifyEnabled false
    shrinkResources false
    debuggable true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    signingConfig signingConfigs.release
}
debug {
    minifyEnabled false
    shrinkResources false
    debuggable true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    signingConfig signingConfigs.debug
}}

productFlavors {
playStore {
    applicationId myApplicationId
    manifestPlaceholders = [crashlyticsEnabled: true]
}

dev {
    applicationId myApplicationId + ".dev"
    manifestPlaceholders = [crashlyticsEnabled: false]
}}

使用Android Studio v3.2.1中的“ build.gradle版本1”,我能够更改构建变体,更新到Android Studio v3.3.1后,我无法更改。

0 个答案:

没有答案