我的应用程序能够从 Galaxy Tab 上的启动器运行,但在 HTC Legend 上,我在 logcat 中收到以下错误:
--------- /dev/log/main 的开头 D/Rosie(194):无法启动活动:android.intent.action.MAIN --------- /dev/log/system 的开头 I/ActivityManager(97):开始活动:Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.company.myapp/.Myapp } W/ActivityManager(97): 权限被拒绝: checkComponentPermission() reqUid=10015 W/ActivityManager(97):权限拒绝:从 ProcessRecord{ 开始 Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.company.myapp/.Myapp } 450f1ac8 194:com.htc.launcher/9999} (pid=194, uid=9999) 需要空
我的清单文件如下:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.myapp"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">
<activity android:name="com.company.SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity><activity android:screenOrientation="portrait" android:label="@string/app_name" android:multiprocess="true" android:configChanges="orientation" android:name="Myapp">
</activity><activity android:name="com.company.CameraActivity" android:multiprocess="true" android:screenOrientation="landscape"></activity>
<activity android:name="com.company.MainMenu">
</activity>
<activity android:name="com.company.ImagePicker">
</activity>
</application>
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
</manifest>
编辑:修复
只需要从设备上卸载并重新安装。