简体   繁体   中英

android: No Launcher activity found

My AndroidManifest.xml is like the followings:

<application android:label="droid VNC server" android:icon="@drawable/icon"
android:name="MainApplication" android:debuggable="true">
<activity android:name=".MainActivity" android:launchMode="singleInstance"
    android:label="@string/app_name" android:icon="@drawable/icon">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
                    <action android:name="org.onaips.vnc.ACTIVITY_UPDATE" />
    </intent-filter> 
</activity>
</application>

I already set the following two lines:

Why I still get the errors No Launcher activity found The launch will only sync the application package on the device

Thanks

Your intent-filter tag in xml file should exactly be like this:

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

Place it inside <activity> tag and you should be ok

Remove the line

<action android:name="org.onaips.vnc.ACTIVITY_UPDATE" />

Because there are 2 similar lines, the 2nd line is usually considered. (Ambiguity). So just remove that line, and you will see the app in the launcher!

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