代码之家  ›  专栏  ›  技术社区  ›  user1506104

用通用调试密钥库为自定义buildType签名

  •  0
  • user1506104  · 技术社区  · 6 年前

    是否可以创建自定义buildType并使用调试的密钥库对其进行签名?

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    
        debug {
            debuggable true
            // debug specific configs here
        }
    
        staging {
            // staging specific configs here
        }
    }
    

    我尝试设置 debubbable true 为我的舞台,但没有工作。我不能用 initWith 配置因为 debug 密友会干扰我 staging 配置。我知道我可以创造一个 signingConfig 但这需要创建一个单独的键。我正在使用调试的默认密钥库。

    请帮忙。

    1 回复  |  直到 6 年前
        1
  •  0
  •   navylover    6 年前

    你可以试试这个:

    staging {
        signingConfig signingConfigs.debug
        ...
    }
    
    推荐文章