如何在 Android Studio 中编辑 .jar 文件 [英] How to edit .jar file in Android Studio

查看:57
本文介绍了如何在 Android Studio 中编辑 .jar 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用 Android Studio 编辑 .jar 文件中的 .class 文件中的代码?我当然已经尝试过编辑它.由于某种原因,我尝试编辑的课程是只读的.

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.

推荐答案

Jar 文件是 .class 文件(和一些其他资源)的压缩档案(zipped files)..class 文件是编译好的 .java 文件.正常情况下是不能编辑已编译的文件的,除非反编译得到源代码,编辑代码,重新编译.

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.

注意:您可以将 .jar 文件重命名为 .zip 文件,并且可以使用任何压缩工具(例如 )打开它>winrarwinzip 查看内容.

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.

这篇关于如何在 Android Studio 中编辑 .jar 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆