【问题标题】:How to sign apk with own keystore file in debug mode?如何在调试模式下使用自己的密钥库文件签署 apk?
【发布时间】:2020-06-29 21:13:13
【问题描述】:

我还想在调试版本中使用我的密钥库文件签署我的 apk,我已经创建了一个包含以下信息的 build.json 文件

{
"android": {
    "debug": {
        "keystore": "..//my.keystore",
        "alias": "alias",
        "password": "password",
        "storePassword": "password"
    },
    "release": {
        "keystore": "..//my.keystore",
        "alias": "alias",
        "password": "password",
        "storePassword": "password"
    }
}
}

当我使用命令 ionic cordova build android --debug --buildconfig 构建 apk 时 它仍然使用不是我的默认密钥签署 apk 对于 ionic cordova build android --release --buildconfig 很好,它正在用我的密钥签名 我已经在signing-config.json 中验证了 我正在关注此文档 https://cordova.apache.org/docs/en/latest/guide/platforms/android/#signing-an-app 请帮忙

【问题讨论】:

  • 我认为你问的是相关here

标签: android cordova ionic-framework ionic3 android-app-signing


【解决方案1】:

我通常使用 Android Studio 而不是 Cordova 工具来执行此操作。也许这对你来说是一种有效的方式。

【讨论】:

  • 你能解释一下如何使用android studio吗?
  • 用Android Studio打开platforms/android目录。打开项目结构(Strg + Alt + Shift + S)。导航到模块并选择应用程序。单击选项卡 Signing Configs,添加新配置并填写输入字段。然后你导航到 Build Variants 并选择那里的应用程序。在 Build Types -> debug 下,将新创建的签名配置填写到 Signing Config 字段中。
  • 仍然是 android studio 使用默认调试密钥签署了 apk
  • 问题已解决我只需要移动新的 buildTypes { debug { signingConfig signingConfigs.Zand } 在cordova 将其签名配置设置为覆盖后添加代码 谢谢durzan
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2018-03-29
  • 2018-12-22
  • 2019-05-10
  • 2021-12-11
相关资源
最近更新 更多