【问题标题】:No Protection by Signature on Specific Manifest Entry in Building an Android Application在构建 Android 应用程序时,对特定清单条目没有签名保护
【发布时间】:2018-02-17 19:49:41
【问题描述】:

我正在尝试签署一个 APK,以便在最初使用 Cordova 和 Ionic 构建的 Play 商店上发布。现在,在完成这些步骤之后:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore release-key.jks android-release-unsigned.apk xxxxxx
zipalign -v 4 android-release-unsigned.apk HelloWorld.apk
apksigner verify HelloWorld.apk

然后当我使用 apksigner 进行验证时,我得到了如下错误:

WARNING: META-INF/services/com.google.protobuf.GeneratedExtensionRegistryLoader
not protected by signature. Unauthorized modifications to this JAR entry will no
t be detected. Delete or move the entry outside of META-INF/.

这有关系吗?我该如何解决这个问题?我的构建中有什么做错了吗?

【问题讨论】:

    标签: java android build android-build


    【解决方案1】:

    只需使用 proguard、dexguard 或类似工具混淆 META-INF/*

    【讨论】:

      【解决方案2】:
      1. 解压 APK
      2. 删除 META-INF/ 中的每个文件
      3. 将整个内容压缩为 .apk
      4. 立即签署上述 APK,没有任何错误。

      【讨论】:

      • META-INF/ 的目录在哪里?我正面临这个问题:(需要尽快发布
      • 使用任何 zip 实用程序(例如:Windows 中的 7-Zip)将 apk 解压到文件夹后,您会在解压后的文件夹中找到 META-INF 文件夹。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-23
      • 1970-01-01
      • 1970-01-01
      • 2016-07-26
      • 1970-01-01
      • 1970-01-01
      • 2022-07-08
      相关资源
      最近更新 更多