How can I add a jar to an APK & make the APK refer to it without Eclipse?

瘦欲@ 提交于 2019-12-06 07:41:43

The Jar(s) you attach in your android project, are not copied into APK.

What happens is that, The code of your Jar(s) file becomes part of your Android code. That means you can not simply place(or copy) Jar files in your APK.

But, There is a way around. In APK, your source code can be found in the classes.dex file.

What you need to do is, follow the steps

1 - Extract APK using winRAR

2 - Convert classes.dex to Jar using dex2jar

3 - Extract Jar file

4 - You will have source code in *.class, You can use JdGUI to convert it to *.java.

Now, you can create new android project and use the code.

This is not possible. All the classes are already compiled. You will need to "build" the APK again so that proper references could be remapped.

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