<activity> does not have a valid android:name when dexguarding

旧街凉风 提交于 2019-12-04 04:22:41

问题


I am trying to dexguard an application that I run as a system application.

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

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?

UPDATE

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).

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.


回答1:


In my case the package name of the class started with a Capital letter




回答2:


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.



来源:https://stackoverflow.com/questions/18980493/activity-does-not-have-a-valid-androidname-when-dexguarding

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!