我正在按照网站上给定的说明制作一个基本的自定义启动器...该说明说可以启动该应用程序,但是当我尝试时,我收到一条错误消息,指出未找到默认 Activity 。
我研究了有关堆栈溢出的现有问题,但没有一个对我有帮助。我的 list 是这样的...
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="omg_its_azzler.launcher">
<activty>
<application android:allowBackup="true"
android:name="omg_its_azzler.launcher.HomeActivity"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activty>
<activity>
android:name="omg_its_azzler.launcher.AppsActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
</activity>
</manifest>
最佳答案
您的 list 语法错误。应用程序标签是您在其中保存所有 Activity 的标签。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="omg_its_azzler.launcher">
<application android:allowBackup="true"
android:name="omg_its_azzler.launcher.HomeActivity"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"/>
<activity>
android:name="omg_its_azzler.launcher.AppsActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
应用程序标签是所有 Activity 的根标签, Intent 过滤器位于 Activity 标签内部
关于java - Android - 找不到默认 Activity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45311741/