Is there a way to get the source code from an APK file?

前端 未结 27 1845
难免孤独
难免孤独 2020-11-21 06:56

The hard drive on my laptop just crashed and I lost all the source code for an app that I have been working on for the past two months. All I have is the APK file that is st

27条回答
  •  别那么骄傲
    2020-11-21 07:57

    While you may be able to decompile your APK file, you will likely hit one big issue:

    it's not going to return the code you wrote. It is instead going to return whatever the compiler inlined, with variables given random names, as well as functions given random names. It could take significantly more time to try to decompile and restore it into the code you had, than it will be to start over.

    Sadly, things like this have killed many projects.
    For the future, I highly recommend learning a Version Control System, like CVS, SVN and git etc.

    and how to back it up.

提交回复
热议问题