应用run后Launcher中没有,也没有launching的原因

当编译无误,设备中存在apk,但应用无法启动且在Launcher找不到图标时,可能是Manifest文件未指定默认Launcher activity。确保< intent-filter >中包含< action android:name="android.intent.action.MAIN"/>和< category android:name="android.intent.category.LAUNCHER"/>。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

今天新建一个工程后,运行后没有起来,在Launcher中也没有找到应用图标。

看来一下/app/有apk文件。

奇怪了。编译没错,应该是配置有问题。

通过对比工程文件发现在manifest中未指定默认的Launcher的activity。

按理说一般不会出现这么低幼的错误。这次创建工程,我先按照引导新建了默认activity,然后再新建另外一个activity时,又使用引导的方式创建。最后没有指定Launcher。

所以,如果发现编译无错,设备中有apk,但应用没有起来,在Launcher中也没有找到应用图标。那么就需要检查Manifest中是否指定了默认Launcher。

            <intent-filter>

                <action android:name="android.intent.action.MAIN" />


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

            </intent-filter>


下面是Console的输出:

[2013-01-20 17:03:48 - Pad] ------------------------------

[2013-01-20 17:03:48 - Pad] Android Launch!

[2013-01-20 17:03:48 - Pad] adb is running normally.

[2013-01-20 17:03:48 - Pad] No Launcher activity found!

[2013-01-20 17:03:48 - Pad] The launch will only sync the application package on the device!

[2013-01-20 17:03:48 - Pad] Performing sync

[2013-01-20 17:04:03 - Pad] Launching a new emulator with Virtual Device 'Nexus_7'

[2013-01-20 17:04:13 - Pad] New emulator found: emulator-5554

[2013-01-20 17:04:13 - Pad] Waiting for HOME ('android.process.acore') to be launched...

[2013-01-20 17:05:42 - Pad] HOME is up on device 'emulator-5554'

[2013-01-20 17:05:42 - Pad] Uploading Pad.apk onto device 'emulator-5554'

[2013-01-20 17:05:42 - Pad] Installing Pad.apk...

[2013-01-20 17:06:24 - Pad] Success!

[2013-01-20 17:06:24 - Pad] /Pad/bin/Pad.apk installed on device

[2013-01-20 17:06:24 - Pad] Done!

[2013-01-20 18:08:50 - Pad] ------------------------------

[2013-01-20 18:08:50 - Pad] Android Launch!

[2013-01-20 18:08:50 - Pad] adb is running normally.

[2013-01-20 18:08:50 - Pad] Performing com.android.pad.LoginActivity activity launch

[2013-01-20 18:08:55 - Pad] Uploading Pad.apk onto device 'emulator-5554'

[2013-01-20 18:08:55 - Pad] Installing Pad.apk...

[2013-01-20 18:09:00 - Pad] Success!

[2013-01-20 18:09:00 - Pad] Starting activity com.android.pad.LoginActivity on device emulator-5554

[2013-01-20 18:09:02 - Pad] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.android.pad/.LoginActivity }



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值