Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to simply install apk in device in Android Studio

My question is when i click on run button it runs gradle command to check change files and build class and then dex to create apk.

If i know there is no change in my files still gradle runs to check.

As i have many libraries attached to my app module to reduce run time. if anyone knows to install apk in device from android studio without running gradle.

Note : I want to install on device which is connected to my system not to emulator,etc.

Note : I want to install from android studio not by using any other software.

like image 449
Nikhilesh Patve Avatar asked Sep 22 '16 13:09

Nikhilesh Patve


People also ask

How do I install an APK file on my Android device?

Just open your browser, find the APK file you want to download, and tap it – you should then be able to see it downloading on the top bar of your device. Once it's downloaded, open Downloads, tap on the APK file and tap Yes when prompted. The app will begin installing on your device.

Can I install an APK on Android Studio emulator?

You can simply drag and drop the . apk file of your application to the emulator and it will automatically start installing.

How can I use APK file in Android Studio?

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. Android Studio then displays the unpacked APK files, similar to figure 1.

Where does Android Studio install APK?

The apks are in $project/$module/build/apk. You can ofcourse just run the application from the UI which will automatically install it. “To install an APK file on the emulated device, drag an APK file onto the emulator screen.


1 Answers

One more solution is using terminal to install apk on devices. Once you have built your APK using the File>Build APK, it shows you the path in which new apk is present.

Just go to the path on terminal like below generated apk path on my system -$cd /Android_App_Code/UpdatedCodeForCheckOut/Projects/IMS/source/apps/Android/flowtalk/app/build/outputs/apk

and type -$ adb install -r app-debug.apk

this command just installs the build on your connected device. and now every time when there is no change in code, just run install command on terminal. It's super fast you will see.

like image 175
Avijeet Avatar answered Sep 20 '22 02:09

Avijeet