DexPatcher / dexpatcher-gradle

Modify Android applications at source-level in Android Studio
https://dexpatcher.github.io/
GNU General Public License v3.0
83 stars 17 forks source link

Handling invalid resources (error: resource 'xxx' has invalid entry name 'xxx'. Invalid character 'xxx'.) #24

Open Lanchon opened 5 years ago

Lanchon commented 5 years ago

UPDATE:

Proper invalid resource support has been implemented in DexPatcher-gradle v2.0.0. The information below is now outdated. Please see the v2 release notes for details.


Invalid resources such as resources with invalid characters in their names (eg: $) can, for the time being, be worked-around as follows:

  1. Add this code section to the project's build.gradle.
  2. Add patched AAPT2 binaries inside an aapt2 directory to the project, as shown here.

The patched AAPT2 binaries come from official Apktool releases and can be downloaded verbatim as artifact dexpatcher-repo.ibotpeaches.apktool:apktool-aapt2 from the DexPatcher repo. (Current version as of this posting comes from Apktool 2.4.0.)

There is a new 'invalid-resources' sample that demonstrates the workaround.

Lanchon commented 4 years ago

UPDATE:

Proper invalid resource support has been implemented in DexPatcher-gradle v2.0.0. The information in this issue is no longer current. Please see the v2 release notes for details.

448975515 commented 3 years ago

Thank you very much. I will download the link below. https://github.com/DexPatcher/dexpatcher-repo/blob/master/m2/dexpatcher-repo/ibotpeaches/apktool/apktool-aapt2/2.5.0/apktool-aapt2-2.5.0.jar Solved the problem.