版權聲明:本文爲博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處連接和本聲明。
問題:
由於需求須要,須要一個沒有任何界面、只有一個後臺Service的程序。可是在安裝的工程中出現以下問題:Default Activity Not Found,如圖:
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
在StackOverFlow上搜索了一下,在這裏記錄一下解決措施。android
解決方法:
這是由於只有一個Service,沒有默認的Activity致使的。markdown
- 點擊上方 Edit Configurations
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
- 選擇General目錄下的Launch Options,選中Nothing
![這裏寫圖片描述](http://static.javashuo.com/static/loading.gif)
- 點擊Apply就大功告成了。