Search code examples
androidreflectionclassloader

How to prevent removing META-INF/* files from .apk?


I'm having some jars in android libs folder that have META-INF files (META-INF/cxf/bus-extensions.txt to be more detailed) which take part in extensions loading. While building android builder removes such files but they are needed actually and they can't be loaded later in runtime.

How can i prevent removing of META-INF/* files? I'd prefer to avoid to unpack each jar, copy files manually each time and write special code to load them.

PS. At the moment i'm building in IntelliJ IDEA and not using maven or gradle.


Solution

  • I had to workaround it - bundle resources from all jars META/*, put them into assets and override resources loading from assets