Android_bug之Default Activity not found
生活随笔
收集整理的這篇文章主要介紹了
Android_bug之Default Activity not found
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在運(yùn)行自己修改默認(rèn)的MainActivety,運(yùn)行自己的Mainactivety時(shí),碰到這個(gè)問題Could not identify launch activity: Default Activity not found
這個(gè)錯(cuò)誤可能出現(xiàn)在run之后的Run的信息框中:?
或者?
?
在這里可以看到關(guān)于運(yùn)行的選項(xiàng),是選擇默認(rèn)的activity還是指定的activity進(jìn)行運(yùn)行,我們的問題就出在和activity相關(guān)地方
如果我們選定指定的activity進(jìn)行運(yùn)行,就會(huì)發(fā)現(xiàn)報(bào)另外一個(gè)錯(cuò)誤
現(xiàn)在我們發(fā)現(xiàn),是因?yàn)樵贏ndroidManifest.xml中沒有定義activity,在其中的中間加上activity的定義就行了
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="zding.focuscircle"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name="zding.focuscircle.FocusCircleActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
這樣,問題就解決了
轉(zhuǎn)載于:https://www.cnblogs.com/jym-sunshine/p/5635977.html
新人創(chuàng)作打卡挑戰(zhàn)賽發(fā)博客就能抽獎(jiǎng)!定制產(chǎn)品紅包拿不停!總結(jié)
以上是生活随笔為你收集整理的Android_bug之Default Activity not found的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 魔星是好人
- 下一篇: 使用 Composer 为 ThinkP