문제

[2012-01-23 15:55:42 - MyApp] No Launcher activity found!
[2012-01-23 15:55:42 - MyApp] The launch will only sync the application package on the device!

I get this error on the Console whenever I try to start my app. I've read all the other questions posted on here regarding this, and all the people just needed to fix their AndroidManifest.xml file.

Below is my entire Android Manifest, which I've looked over about 50 times for errors.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="danny.personal"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="10" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >

        <activity
            android:label="@string/app_name"
            android:name=".Home" >
            <intent-filter>
                <action android:name="danny.personal.HOME" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:label="@string/app_name"
            android:name=".ContactHome" >
            <intent-filter>
                <action android:name="danny.personal.CONTACTHOME" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

    </application>

</manifest>
도움이 되었습니까?

해결책

Change:

<action android:name="danny.personal.HOME" />

To:

<action android:name="android.intent.action.MAIN" />

Assuming that's your main activity. Also, modify the XML block associated with your second activity (ContactHome) to the following:

<activity android:label="@string/app_name"
          android:name=".ContactHome" />

This of course assumes that Home is your main activity and ContactHome is launched from within Home.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top