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.


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


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.


Enable USB debugging on your device by going to Settings > Developer options.On Android 4.2 and newer, Developer options is hidden by default. To make it available, go to Settings > About phone and tap Build number seven times. Return to the previous screen to find Developer options.

Hope this will work

链接地址: http://www.djcxy.com/p/23292.html

上一篇: Openfire发送当用户离线时发送推送通知

下一篇: 如何使用Android Studio在Android手机上安装应用程序?