简体   繁体   中英

Android. No Launcher Activity found

I keep getting this message when trying to run the emulator, even though I've put the launcher activity in my manifest. Does anyone have an idea what I'm doing wrong?

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.libsdl.app"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="12"
    android:targetSdkVersion="19" />

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <activity
        android:name="org.libsdl.app.SDLActivity"
        android:label="@string/app_name" >

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

Resolved: After some more mucking around in my files, I found that there were multiple AndroidManifest.mk files and I had put the activity in the wrong one. (I had this in the mk file located in the bin folder, instead of the one in root.)

I was having this same issue, and the OP's edit at the bottom of the post was what fixed it. (I would have upvoted, but I do not have any reputation points at this time).

To clarify for anyone in the future: it appears that Eclipse will automatically create a duplicate of the AndroidManifest.xml in the bin directory. This copy is automatically generated off of the one you are supposed to edit on the root directory.

If you edit the manifest in the bin directory, Eclipse will not give you any warning that you are editing the wrong file. You can even save to it, and run validate to ensure that there are no errors. When you run the program, it will actually be overwritten, but for some reason Eclipse tends not to prompt you that the contents have been overridden while you still have the file open.

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