Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code changes not reflected in .apk [Android Studio] [closed]

Since morning my code changes are not being reflected in .apk. I did not updated anything. I saw some post here pointing out to sdk-tools. But I haven't touched sdk-tools. What can be the possible reason?

like image 707
Nbajam 2015 Avatar asked Oct 22 '15 06:10

Nbajam 2015


People also ask

How do I get my Android Studio code back?

Android Studio has a code history feature which allows you to see previous versions of a corresponding file. Just right click on a file in the IDE's file explorer and you will see this option.

How do I debug an APK file?

To start debugging an APK, click Profile or debug APK from the Android Studio Welcome screen. Or, if you already have a project open, click File > Profile or Debug APK from the menu bar. In the next dialog window, select the APK you want to import into Android Studio and click OK.

How can you debug your app when it's already released?

You can start a debugging session as follows: Set some breakpoints in the app code. In the toolbar, select a device to debug your app on from the target device drop-down menu. If you don't have any devices configured, then you need to either connect a device via USB or create an AVD to use the Android Emulator.

Can code be extracted from apk?

Use jadx. Jadx decompiles the code in a given APK to java source files. Use apktool. Apktool is a command line tool which extracts resources and decompiles code into smali for a given apk.


2 Answers

Try clean (Build->Clean Project) and rebuild (Build->Rebuild Project) your solution.

like image 73
texnedo Avatar answered Sep 21 '22 02:09

texnedo


Gradle tends to cache some parts of the .apk to speed-up the building process. In most cases, doing a clean (Build -> Clean Project) will solve such issues :-)

You can also clean all the already-created elements by deleting the /build subdirectory of your project and rebuilding.

like image 36
Kelevandos Avatar answered Sep 23 '22 02:09

Kelevandos