Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not Auto launching app when I run thru android studio

I right click my project-> Run -> All Tests

Its Building and Installing in my Devices.

But app is not automatically launching like in eclipse.

It seems like I installed it through adb install in terminal. Need to manually open each time I installed.

like image 738
Padma Kumar Avatar asked May 20 '13 13:05

Padma Kumar


People also ask

Why my app is not opening in Android Studio?

Unplug your device from the USB port on the computer. Restart the device by powering off and back on. Verify that Settings => Developer options => USB Debugging is enabled. Quit and re-launch Android Studio.

Why does my app keeps stopping Android Studio?

Improper installation can cause Android Studio to keep stopping. When apps are installed on a device, all the necessary files to run the app will be stored on the device. Once any required files don't store on the device, the app will not work properly and may keep sudden stops.

How do I fix Android Studio not working?

Open Start menu > Computer > System Properties > Advanced System Properties In the Advanced tab > Environment Variables. Add new system variable JAVA_HOME that points to JDK folder, C:\Program Files\Java\jdk1. 7.0_13\


2 Answers

It is because you are running it as a 'test' and not as an 'Android Application'.

  1. Open the "Edit Configurations" pane and click the '+' button.
  2. Select the option to create a new 'Android Application' and then select the correct module.
  3. Apply, and you can then delete the test configuration you were using before if you wish.

Then every time you run, make sure you are running as an Android Application and not a test, and it will auto-launch on install.

like image 94
TomRichardson Avatar answered Sep 28 '22 11:09

TomRichardson


File > Invalidate Caches / Restart fixes the problem.

like image 37
Osman Yalın Avatar answered Sep 28 '22 10:09

Osman Yalın