android - Google Play 结算 > 在设备上验证购买 > 使用 ProGuard 混淆

标签 android android-proguard android-billing

我想知道文档是否将使用 ProGuard 的含义错误(相反)?

enter image description here

来源:https://developer.android.com/google/play/billing/billing_library_overview

但我的理解是:我不能将这一行添加到 ProGuard 配置文件中,有没有人也注意到这一点?或者确认一下?

 -keep class com.android.vending.billing.**

最佳答案

文档是正确的。我同意你的看法,如果你混淆了你的代码,那么你必须添加这样的 ProGuard 规则以保留 vending.billing 类,这可能看起来令人困惑。

为了阐明其含义,如果您在项目中使用混淆,那么为了不破坏计费库,则必须将此类条目添加到 ProGuard 规则中

这是必需的,因为虽然 com.android.vending.billing 不是计费库的一部分,因为它属于 Google Play 服务,但它是通过 AIDL 访问的,混淆项目可能会删除/重命名自动售货引用。

关于android - Google Play 结算 > 在设备上验证购买 > 使用 ProGuard 混淆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54211740/

相关文章:

java - 如何在android中包装alertdialog?

android - Unity Android 应用程序上的 Facebook API,登录时说它是 "cancelled by the Player"?

java - android-java 如何取消异步任务

java - ProGuard 导致应用程序延迟

android - 为什么在查询Purchases.subscriptions资源时developerPayload字段为空?

android - 是否有适用于 Android 的精简版 SVG 查看器?

android-gradle-plugin - 两台机器上相同输入的不同 proguard 输出

android - Proguard 不会混淆 Android 中的代码

in-app-billing - 在 2020 年 6 月 23 日之前打开此应用程序以确认您的订阅

安卓计费库错误