0

当我启动 Gradle 来构建测试或调试应用程序时,它会在一开始就记录下来。

BuildType_Decorated{name=release, ... 

具有来自版本 builtType 的属性,而我运行了 Debug buildType !

知道这个问题可能是什么吗?

compileSdkVersion ANDROID_BUILD_SDK_VERSION
buildToolsVersion ANDROID_BUILD_TOOLS_VERSION

productFlavors {
    // Define separate dev and prod product flavors.
    dev {
        // dev utilizes minSDKVersion = 21 to allow the Android gradle plugin
        // to pre-dex each module and produce an APK that can be tested on
        // Android Lollipop without time consuming dex merging processes.
        minSdkVersion 21
        multiDexEnabled false
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    prod {
        // The actual minSdkVersion for the application.
        minSdkVersion ANDROID_BUILD_MIN_SDK_VERSION
        multiDexEnabled false
    }
}
defaultConfig {
    applicationId "fr.millezimsolutions.app.millezimu"
    targetSdkVersion ANDROID_BUILD_TARGET_SDK_VERSION
    minSdkVersion ANDROID_BUILD_MIN_SDK_VERSION
    versionCode ANDROID_BUILD_VERSION_CODE
    versionName ANDROID_BUILD_APP_VERSION_NAME
}

buildTypes {
    release {
        debuggable false
        ext.enableCrashlytics = true
        renderscriptOptimLevel 3
        signingConfig android.signingConfigs.release
        zipAlignEnabled true
        minifyEnabled true
        //  shrinkResources true
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules-release.pro'
    }
    debug {
        debuggable true
        renderscriptOptimLevel 3
        applicationIdSuffix ".debug"
        versionNameSuffix "debug"
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules-debug.pro'
        testProguardFile('proguard-rules-test.pro')
    }
}
4

0 回答 0