简体   繁体   中英

My applications won't appear on my home screen? (android)

I'am making apps for android using eclipse but suddenly when I was using the emulator the apps stopped appearing on my home screen and when I check in the Application manager they are installed but I can't access them and I tried installing the app on my android phone and the same thing also happened so any clue how to fix this, that would be great. thanks

edit: The app starts correctly when I launch it from eclipse but the icon won't appear on my home screen so I can't access it

here is my mainfest code:

<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>

try this

    <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>

Try removing the intent-filter of your MainActivity and changing the Menu intent-filter to:

<intent-filter>
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />
</intent-filter>

EDIT:

Your logcat suggests that you are trying to start an activity with an action that is not set (or set incorrectly).

It's looking for the action com.Moon.khwallpaper.SET2 while what you have set is com.example.wallpaper.SET2 .

I believe changing the latter to the former should work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM