开发者

How to read manifest file from dependent JAR in Android?

开发者 https://www.devze.com 2023-01-08 13:57 出处:网络
Does anyone know how to read values from MANIFEST.MF from my custom dependent JAR in Android ? I`ve tried many ways but it seems that they d开发者_开发知识库o not work for Android environment.This wil

Does anyone know how to read values from MANIFEST.MF from my custom dependent JAR in Android ? I`ve tried many ways but it seems that they d开发者_开发知识库o not work for Android environment.


This will help

JarInputStream jarStream = new JarInputStream(stream);
Manifest mf = jarStream.getManifest();


Include the custom dependent jar also as a resource in your apk file, then you can read it somehow. As a custom dependency only, you are not allowed to read the jar file, or you will get false results.

0

精彩评论

暂无评论...
验证码 换一张
取 消