Problem :
I got this Error , When I tried to create an application without any Activity . Basically like to develop an Android Headless application.
And this App has only one Service and BroadcastReceiver which are actually in use but it also has sample dummy Activity which was not using and will delete later while doing code cleanup.
In this scenario tried to run the application from Studio , but getting this error inside Studios Run console.
The reason to make an App with no activity or service could be making a Homescreen Widget app that doesn't need to be started.
Once you start a project don't create any activities. After you created the project just hit run. Android studio will say No default activity found.
Solution :
In AndroidStudio goto -> Edit Configuration (From the Run menu) and in the Launch option part set the Launch value to Nothing. Then click ok and run the App.
(Since there is no launcher activity, No app will be show in the Apps menu.).
This fixed my problem. Thanks
No comments:
Post a Comment