简体   繁体   English

当我不使用 proguard/R8 时,为什么 com.google.android.play.core 中的 class 名称会被混淆/缩小?

[英]Why are class names in com.google.android.play.core obfuscated/minified when I'm not using proguard/R8?

I have the following code in my app:我的应用程序中有以下代码:

val reviewMan = ReviewManagerFactory.create(this)
Log.d(Plog.LOG_TAG, "created Google Play Review Manager: "+reviewMan.toString())

But the message that shows up in the console when I run it is:但是当我运行它时,控制台中显示的消息是:

created Google Play Review Manager: com.google.android.play.core.review.c@131b84b创建 Google Play 评论管理器:com.google.android.play.core.review.c@131b84b

This is an unobfuscated debug build (the build type's definition in build.gradle contains minifyEnabled false ) so why doesn't the message say, "created Google Play Review Manager: com.google.android.play.core.review.ReviewManager@131b84b"? This is an unobfuscated debug build (the build type's definition in build.gradle contains minifyEnabled false ) so why doesn't the message say, "created Google Play Review Manager: com.google.android.play.core.review.ReviewManager@131b84b"?

The reason for the class name c in the Google Play library is that the library itself has been minified before it is distributed through Maven. Google Play库中class名称c的原因是库本身在通过Maven分发之前已经被缩小。

The aar can be found here , and the classes.jar inside of it already has the minified names. aar可以在这里找到,其中的classes.jar已经有了缩小的名称。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM