【问题标题】:Launcher intent is in manifest, but no launcher activity found启动器意图在清单中,但未找到启动器活动
【发布时间】:2015-02-03 16:09:04
【问题描述】:

我对 Android 开发还很陌生。我使用 android studio 创建了一个项目,并选择我的第一个活动作为登录活动。在更改布局中的一些基本内容/尝试在 java 中添加一些功能之后,我想我会进行测试运行。在尝试构建 apk 并安装应用程序时,它在我的手机上安装得很好,但 AIDE(一个开发 android 应用程序)说没有找到启动器活动。这是我的清单文件:

    <!-- To auto-complete the email text field in the login form with the user's emails -->    
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />    
    <uses-permission android:name="android.permission.READ_PROFILE" />    
    <uses-permission   android:name="android.permission.READ_CONTACTS" />    

    <application
        android:allowBackup="true"    
        android:icon="@drawable/ic_launcher"    
        android:label="@string/app_name"    
        android:theme="@style/AppTheme" >    
        <activity
            android:name=".LoginActivity"    
            android:label="@string/app_name"    
            android:windowSoftInputMode="adjustResize|stateVisible" >    
            <intent-filter>    
                <action android:name="android.intent.action.MAIN" />    
                <category android:name="android.intent.categor.LAUNCHER" />    
            </intent-filter>    
        </activity>    
    </application>    

</manifest>    

那么我错过了什么?我搜索了很多,但我找到了适用于我的场景的答案。任何帮助,将不胜感激。谢谢

【问题讨论】:

  • 尝试使用Activity类的全名-com.rrdevs.peerboard.LoginActivity
  • 将 ""android.intent.categor.LAUNCHER" 更改为 ""android.intent.category.LAUNCHER" ......你错过了 "y"
  • 感谢您的建议!现在我更正了类别的拼写,这似乎可以工作了。

标签: android android-intent android-manifest


【解决方案1】:
<category android:name="android.intent.categor.LAUNCHER" />    

应该是的

<category android:name="android.intent.category.LAUNCHER" />  

【讨论】:

  • 非常感谢,成功了!不敢相信我以前没有注意到它!
  • 不客气。在使用 AndroidManifest.xml 文件时,我们应该格外小心。一个简单的错字可能会毁掉一切。我看到你是 Stackoverflow 的新手。所以让我提醒你,如果一个答案有助于解决你的问题,你应该接受这个答案。方法如下:meta.stackexchange.com/questions/23138/…
猜你喜欢
  • 2013-02-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-04-27
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多