How to edit .jar file in Android Studio

一曲冷凌霜 提交于 2019-12-06 23:19:37

问题


How can I edit code in a .class file in a .jar file using Android Studio? I have already tried to edit it of course. The class I am trying to edit is a read only for some reason.


回答1:


Jar files are compressed archives (zipped files) of .class files( and few other resources). .class files are compiled .java files. You can not edit a compiled file in normal situation unless you decompile to get source code, edit the code and recompile again.

Decompiling is a tedious process, thus getting a source code is the best option here.

Note: You can rename the .jar file to a .zip file and can open it using any compression tool such as winrar or winzip to see the content.



来源:https://stackoverflow.com/questions/29478227/how-to-edit-jar-file-in-android-studio

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