Modifying contents of Android .aar file / Converting to and from .zip format

拈花ヽ惹草 提交于 2019-11-28 17:03:59

Supposing you have mylib.aar in your current directory, try the following:

$ unzip myLib.aar -d tempFolder # or other extracting tool
# Change whatever you need
$ jar cvf myNewLib.aar -C tempFolder/ .

For extracting following command you have to execute:

unzip myLib.aar -d tempFolder

Do all your changes in your extracted code and using below code you can again repackage it.

You have to move inside the extracted folder to again repackage it, using below code:

cd tempFolder

For repacking of aar file this way is working:

zip -r ../my-new-library.aar *

Above mentioned 3 steps were practically tested by me and its working properly.

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