Android的应用内结算和Proguard的(未知来源) [英] Android In-app Billing and Proguard (Unknown Source)
问题描述
我使用谷歌和的Proguard的应用内结算服务。我使用作为一个Proguard的配置文件是在......一曲/ SDK /工具/ proguard的/ proguard的-android.txt
I am using the In-app Billing service of Google and Proguard. The configuration file that I am using as a Proguard is the one in .../sdk/tools/proguard/proguard-android.txt
由于谷歌说,在这里: http://developer.android.com/google /play/billing/billing_best_practices.html 我添加了配置文件中的以下行:
As Google says here: http://developer.android.com/google/play/billing/billing_best_practices.html I added the following line in the configuration file:
-keep class com.android.vending.billing.**
我使用IAB的从谷歌更新的文件,以及:<一href=\"https://$c$c.google.com/p/marketbilling/source/detail?r=7ec85a9b619fc5f85023bc8125e7e6b1ab4dd69f\" rel=\"nofollow\">https://$c$c.google.com/p/marketbilling/source/detail?r=7ec85a9b619fc5f85023bc8125e7e6b1ab4dd69f
问题是,有时,用户报告随机崩溃这个堆栈跟踪:
The problem is that sometimes, users report random crashes with this stacktrace:
E/AndroidRuntime: FATAL EXCEPTION: Thread-455
java.lang.NullPointerException
at com.xx.xxxx.util.IabHelper.startSetup(Unknown Source)
at com.xx.xxxx.util.IabHelper$2.run(Unknown Source)
at java.lang.Thread.run(Thread.java:856)
这也发生在我的设备(刚刚开放的应用程序),但只有今天我发生过一次。
It also happened in my device (just opening the app) but only happened once to me today.
和我不知道这是否是谷歌文件(IAB)的什么问题,缺少Proguard的配置文件中的
And I am not sure if it is problems of Google files (of IAB) or something is missing in the Proguard configuration file.
推荐答案
添加以下字符串
-keep class com.android.vending.billing.**
要ProGuard的配置告诉他不要混淆了包。
to ProGuard configuration tells him to not to obfuscate that package.
异常来自com.xx.xxxx.util.IabHelper,所以你可以尝试添加像
Exception comes from com.xx.xxxx.util.IabHelper, so you can try to add something like
-keep class com.xx.xxxx.util.IabHelper.**
要保持你的包,因为它是没有ProGuard的。
to keep your package as it was without ProGuard.
这篇关于Android的应用内结算和Proguard的(未知来源)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!