<活动>dexguarding时没有有效的android:name [英] <activity> does not have a valid android:name when dexguarding
问题描述
我正在尝试对作为系统应用程序运行的应用程序进行dexguard保护.
I am trying to dexguard an application that I run as a system application.
但是,当我尝试将其推送到 system/app
目录时,我从PackageParser中收到以下错误消息.
However when I try to push it to the system/app
directory, I get the following error from the PackageParser.
W/PackageParser( 1995): /system/app/My.apk (at Binary XML file line #290): <a
ctivity> does not have valid android:name
我还向 dexguard-project.txt
中添加了以下内容,但无济于事.
I have also added the following to the dexguard-project.txt
but to no avail.
-keepresourcexmlattributenames
manifest/installLocation,
manifest/versionCode,
manifest/package,
manifest/versionName,
manifest/application/*/intent-filter/*/name,
manifest/application/*/activity/name
有人知道如何解决这个问题吗?
Does anyone know how to solve this issue?
更新
成功阻止了清单中混淆了 android:name
属性(我可以看到混淆后提取清单文件时显示纯文本).
Ok from what I see the manifest/application/*/activity/name
successfully stopped the android:name
attributes from being obfuscated in the manifest (I can see the plain text when I extract the manifest file after the obfuscation).
但是,在提取的清单文件中的活动代码第#290
行中,足够奇怪的 android:name
很奇怪.其他所有活动名称都可以用纯文本显示.
However strangely enough android:name
in the activity tag at line #290
cannot be found in the extracted manifest file. All the other activity names can be seen in plain text.
推荐答案
我发现这是因为产生此错误的活动在清单文件中,但是没有相应的Java类.
I found out that this is because the activities that gave this error are in the manifest file but there were no respective java classes.
从清单文件中删除条目即可解决此问题.
Removing the entries from manifest file solved the issue.
这篇关于<活动>dexguarding时没有有效的android:name的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!