Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install an app on an android phone using Android studio?

I'm new to android programming and followed a simple "hello world!" tutorial. It works on the emulator and also on my phone when it is plugged in my computer. However, I have no idea how to install it on my phone. I use Android Studio 0.8.6 and a Samsung Galaxy S4 using Android 4.4.2. I've tried to install the .apk file but when the installing is done, the option "open" is greyed out and the icon does not appear in my menu. Does anyone know how to actually install the app so it can be used without the phone being plugged in the computer?

Sorry if Im doing this wrong, this is my first post. Thanks.

like image 790
Marty_01 Avatar asked Nov 03 '14 23:11

Marty_01


People also ask

How do I install Android apps on Android Studio?

Run on an emulatorIn the toolbar, select your app from the run/debug configurations drop-down menu. From the target device drop-down menu, select the AVD that you want to run your app on. Click Run . Android Studio installs the app on the AVD and starts the emulator.

Can I install APK in Android Studio?

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. An APK Installer dialog appears. When the installation completes, you can view the app in your apps list.

Can I use Android Studio in phone?

If you've installed Android Studio on a Windows-based computer, you must install a USB device driver before you can run your app on a physical device. Note: For Ubuntu Linux, follow the instructions in Run Apps on a Hardware Device documentation. In Android Studio, click Tools > SDK Manager.


2 Answers

First, you have to export a full .apk for your application correctly, see instructions here, after that you need to somehow download that file to your device. You can upload it on any hosting (email attachment even, for example), I just think that's the simplest way install/run app without plugging your phone.

If something wrong occured when running, please re-check some option below:
- Check your log if any error shown
- Check your .xml files define your application layouts in folder: res/layout

like image 91
Fuong Lee Avatar answered Sep 21 '22 19:09

Fuong Lee


If you go to the bin folder you should find the .apk file there. But that .apk file is not capable of being uploaded to market. In order to get a fully working .apk file you should export it as an android project and once that is done you should start off by uninstalling the application from your phone since running it from pc through phone installs the apk there. Once it's uninstalled you can transfer the apk file you exported to your phone and install it.

like image 20
andrewjones Avatar answered Sep 24 '22 19:09

andrewjones