Skip to main content

Android Studio - Run application without launcher activity

So like everyone else, I moved to Android Studio and encountered issues.

My current issue - Android Studio won't let me run an application without a launch-able activity in the Manifest, for example, my application Pro key which isn't suppose to be launch-able and runs great with Eclipse.

Obviously it's not suppose to run but is there any way to install it directly from Studio?

Solved

In Run/Debug Configurations (just next to the launch button in the toolbar) you can manage your application configurations. There you should be able to specify whether you want to launch an Activity or not.


In Run/Debug Configurations in General -> Launch Options -> Launch select Nothing like this

enter image description here


For the case you mention, editing the 'Defaults' run configuration may not result in a runnable/installable app (at Android Studio 0.2.3, at least).

Instead, it is possible to run/install by defining a new run configuration:

Run -> Edit Configurations -> '+'

Select 'Do not launch Activity', but leave 'Deploy application' selected.


Comments

Popular posts from this blog

Imitate join for NoSQL document database

Are there any workarounds to execute join-like query with NoSQL document database? Example: We need to select last month articles by users with rating more than thousand. SQL solution is SELECT a.* FROM Articles as a INNER JOIN Users as u ON a.UserId = u.Id WHERE a.Date > (Now - Month) AND u.Rating > 1000 I can imagine several NoSQL solutions. First is two queries solution: Retrieve users with rating more than 1000 Retrieve last month articles for these users I don't like it as I have to make two queries and I have to retrieve all users with rating > 1000 (what if I have 1kk of users?) The other NoSQL solution which comes to my mind is denormalization. But I am not big fan of it. I would be not against of putting comments collection to post entity (because comments belong to post), but I don't like to put user inside article or articles inside user. Are there any other solutions? Solved You can do that using Multi Maps / Reduce indexes with Rave...