未知的类混淆的Andr​​oid项目时ILicensingService笔记 [英] Unknown classes ILicensingService notes when obfuscating Android project

查看:2712
本文介绍了未知的类混淆的Andr​​oid项目时ILicensingService笔记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个Android版本与Ant和ProGuard的。我注释掉在project.properties以下行,尽管在评论说文件指出,你不应该修改它;):

I'm trying to build an Android release with Ant and ProGuard. I uncommented the following line in project.properties, despite the comment in said file noting that you shouldn't modify it ;):

proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

混淆时,我得到了以下注意事项:

When obfuscating, I get the following notes:

[proguard] Note: the configuration refers to the unknown class 'com.google.vending.licensing.ILicensingService'
[proguard] Note: the configuration refers to the unknown class 'com.android.vending.licensing.ILicensingService'

我不明白为什么会这样。这些线可以在默认的ProGuard配置文件中找到($ {} sdk.dir /tool​​s/proguard/proguard-android.txt):

I do understand why this is happening. These lines can be found in the default ProGuard config file (${sdk.dir}/tools/proguard/proguard-android.txt):

-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

我不使用谷歌的授权服务,因此这些类确实是未知的。我发现了一个解决方案,通过更新的ProGuard-project.txt摆脱这些注意事项:

I'm not using the Google Licensing Service, so the classes are indeed unknown. I found a solution to get rid of these notes by updating the proguard-project.txt:

-dontnote **ILicensingService

我的问题:这是处理这个正确的方式?在我看来,这些类不应该被默认保存无论如何,因为这LIB不是强制性一个Android项目。我能想到的唯一的方式来实现,这是由默认的配置文件复制到我的项目,消除了-keep线,完全无视在SDK默认的配置文件。这似乎并不为正确的路要走要么不。还是我失去了一些东西?

My question: Is this the correct way of handling this? It seems to me that these classes shouldn't be kept by default anyway, since that lib isn't mandatory for an android project. The only way I can think of to achieve this is by copying the default config file to my project, removing the -keep lines and ignoring the default config file in the SDK completely. Which doesn't seem as the proper way to go either. Or am I missing something?

推荐答案

设置-dontnote com.google.vending.licensing.ILicensingService是好的。事实上,它可能是默认的配置文件的一部分。

The setting "-dontnote com.google.vending.licensing.ILicensingService" is fine. In fact, it could have been part of the default configuration file.


  1. 的-keep选项可能对使用该库项目是必要的。

  2. 的-dontnote选项可能是不错的坐席preSS的说明有关-keep选项,不使用的库项目。该说明只是一个善意提醒,该配置文件可能包含一个错字,因为指定的类似乎并不存在。它不影响该处理。

这篇关于未知的类混淆的Andr​​oid项目时ILicensingService笔记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆