ProGuard仍显示完整的活动名称 [英] ProGuard Still Displays Full Activity Name

查看:43
本文介绍了ProGuard仍显示完整的活动名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Proguard,并且在我的应用中使用此代码

I am using Proguard and in my app I use this code

            System.out.println("ACTIVITY NAME IS " + activity.getLocalClassName());

它以活动发布模式打印出活动名称.我以为应该混淆所有的类名?

It prints out the Activity name out, Iin release mode. I thought it is suppose to obfuscate all class names?

这种行为正常吗?

推荐答案

是的,这是正常现象.永远不要混淆活动名称,因为这些名称在manifest.xml中引用.和android通过反射访问这些活动,因此它们的名称无法更改.检查此链接 https://stackoverflow.com/a/20620108/1320616

Yes this is a normal behaviour. Activity names are never obfuscated because these are referenced in manifest.xml. and android access these activities via reflection so their names cannot be changed. check this link https://stackoverflow.com/a/20620108/1320616

这篇关于ProGuard仍显示完整的活动名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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