[英]My applications won't appear on my home screen? (android)
我正在使用eclipse开发适用于android的应用程序,但是突然间,当我使用模拟器时,这些应用程序停止出现在我的主屏幕上,并且当我在“应用程序管理器”中签入它们时,它们已安装但无法访问,因此我尝试在我的Android手机也发生了同样的事情,所以任何提示如何解决这个问题,那都很棒。 谢谢
编辑:当我从Eclipse启动应用程序时,该应用程序可以正确启动,但该图标不会出现在主屏幕上,因此我无法访问它
这是我的mainfest代码:
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="18" />
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.Moon.khwallpaper.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.Moon.khwallpaper.Menu"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MENU" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.Moon.khwallpaper.SET2"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.SET2" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
尝试这个
<uses-sdk
android:minSdkVersion="5"
android:targetSdkVersion="18" />
<supports-screens android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.SET_WALLPAPER"/>
<uses-permission android:name="android.permission.SET_WALLPAPER_HINTS"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.wallpaper.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="com.example.wallpaper.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.wallpaper.Menu"
android:label="@string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name="com.example.wallpaper.SET2"
android:label="@string/app_name"
android:screenOrientation="portrait" >
</activity>
</application>
</manifest>
尝试删除MainActivity的意图过滤器,然后将菜单意图过滤器更改为:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
编辑:
您的logcat建议您尝试使用未设置(或设置错误)的动作来开始活动。
它正在寻找动作com.Moon.khwallpaper.SET2
而您设置的是com.example.wallpaper.SET2
。
我相信将后者更改为前者应该可行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.