Android基础 - No Launcher activity found!
来源:互联网 发布:怎么查找淘宝评论过的 编辑:程序博客网 时间:2024/04/28 13:32
1. No Launcher activity found!
今天启动Android App时, 出现以下错误:
[2013-06-02 22:55:50 - Demo1] No Launcher activity found!
[2013-06-02 22:55:50 - Demo1] The launch will only sync the application package on the device!
原因是: 在 AndroidManifest.xml没有加:
<intent-filter> <category android:name="android.intent.category.LAUNCHER" /> <action android:name="android.intent.action.MAIN" /> </intent-filter>
所以启动器找不到要启动的Activity。
-----------------------------------------------------------------------------------
修改前的 AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test.test" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.test.sudoku.Sudoku" > </activity> </application></manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test.test" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="17" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.test.sudoku.Sudoku" > <intent-filter> <category android:name="android.intent.category.LAUNCHER" /> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> </application></manifest>
2. AndroidManifest.xml 中 R 与Activity的 Package
AndroidManifest.xml中指定资源文件类R所在的地方:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test.test"
与 Activity的name的前缀的关系:
<activity android:name="com.test.sudoku.Sudoku" >
如果资源类 R 的package与 Activity的package 一样,那么,我们可以将Activity的name写成下面的样子;否则就必须将Activity的pack名加上,写成上面的样子:
<activity android:name=".Sudoku" >
参考网页:
http://stackoverflow.com/questions/14955993/no-launcher-activity-found
- Android基础 - No Launcher activity found!
- Android基础 - No Launcher activity found!
- Android : No Launcher activity found!
- android,No Launcher activity found!
- android :No Launcher activity found!
- Android No Launcher activity found!
- Android Activity 提示[No Launcher activity found!]
- No Launcher activity found!
- No Launcher activity found!
- No Launcher activity found!
- No Launcher activity found!
- No Launcher activity found!
- Android !No Launcher activity found!错误
- android 初学: 提示No Launcher activity found!
- Android错误信息分析-No Launcher activity found!
- No Launcher activity found!(Android)
- Android !No Launcher activity found!错误
- android开发No Launcher activity found! 解决方法
- 题目1075:斐波那契数列
- ubuntu12.04建立交叉编译环境,bin/.arm-none-linux-gnueabi-gcc: not found
- 反射
- Android中消息系统模型和Handler Looper
- c#文件读写相关类介绍
- Android基础 - No Launcher activity found!
- ListView内控件与listview抢夺焦点
- 在webservice中传输实体对象
- E: dpkg 被中断,您必须手工运行 sudo dpkg --configure -a 解决此问题
- Java常用排序算法及性能测试集合
- android交叉编译c程序
- cocos2d-x环境搭建及android移植
- PHP中的文件缓存数据三种方式
- 【3-3最长的回文子串】