繁体   English   中英

我的新版本变体的APK在哪里?

[英]Where is the apk for my new build variant?

我阅读了android文档的“构建系统”部分: http : //developer.android.com/sdk/installing/studio-build.html

因此,构建变体由product_flavor-build_type组成。 我有这个build.gradle:

buildTypes {
    debug {
        applicationIdSuffix '.debug'
        debuggable true
        minifyEnabled !skipProguard
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        signingConfig signingConfigs.debug
        zipAlignEnabled false
    }
    debugtest {
        // unit tests
        applicationIdSuffix '.test'
        debuggable true
        minifyEnabled false
        shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        signingConfig signingConfigs.debug
        zipAlignEnabled false
    }
    release {
        minifyEnabled true
        shrinkResources true
        debuggable false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        signingConfig signingConfigs.release
    }
}

productFlavors {
    internal {
        applicationId "${project.applicationId}.internal"
        buildConfigField 'boolean', 'EXPERIMENTAL', 'true'
        buildConfigField 'boolean', 'FAKE_HTTP_RESPONSE', 'false'
    }
    production {
        applicationId project.applicationId
        buildConfigField 'boolean', 'EXPERIMENTAL', 'false'
        buildConfigField 'boolean', 'FAKE_HTTP_RESPONSE', 'false'
    }
    automation {
        applicationId "${project.applicationId}.automation"
        buildConfigField 'boolean', 'EXPERIMENTAL', 'true'
        buildConfigField 'boolean', 'FAKE_HTTP_RESPONSE', 'true'
    }
}

我想创建mobile-debug-automation-unaligned.apk,以便可以在Dagger模块中使用“ FAKE_HTTP_RESPONSE” BuildConfig变量。

但是,当我在Android Studio中单击“构建变体”时,我看到一个构建变体-“ internalDebug”。 我希望看到9个构建变体(buildType * productFlavor)。

在我的项目目录中,我看到以下apk:

MY_APP /移动设备:mobile-release.apk,mobile-debug-unaligned.apk

MY_APP / mobile / build / outputs / apk:mobile-internal-debug-unaligned.apk

如何生成新的“自动化” apk?

请点击以更改:

在此处输入图片说明

如果不起作用,请重新构建您的项目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM