0

android sdkを更新しましたが、新しいアプリケーションを作成すると、これまでに見たことのない新しいオプションが表示されます。 ここに画像の説明を入力してください

どういう意味 。この親アクティビティに名前を付けますが、アプリケーションを実行するとこのエラーが発生します

No Launcher activity found!
The launch will only sync the application package on the device!

完全なコンソール出力

[2012-08-13 13:54:35 - GG] ------------------------------
[2012-08-13 13:54:35 - GG] Android Launch!
[2012-08-13 13:54:35 - GG] adb is running normally.
[2012-08-13 13:54:35 - GG] No Launcher activity found!
[2012-08-13 13:54:35 - GG] The launch will only sync the application package on the device!
[2012-08-13 13:54:35 - GG] Performing sync
[2012-08-13 13:54:35 - GG] Automatic Target Mode: launching new emulator with compatible AVD 'Androidvirtual'
[2012-08-13 13:54:35 - GG] Launching a new emulator with Virtual Device 'Androidvirtual'
[2012-08-13 13:54:35 - GG] ------------------------------
[2012-08-13 13:54:35 - GG] Android Launch!
[2012-08-13 13:54:35 - GG] adb is running normally.
[2012-08-13 13:54:35 - GG] No Launcher activity found!
[2012-08-13 13:54:35 - GG] The launch will only sync the application package on the device!
[2012-08-13 13:54:35 - GG] Performing sync
[2012-08-13 13:54:35 - GG] Automatic Target Mode: launching new emulator with compatible AVD 'Androidvirtual'
[2012-08-13 13:54:35 - GG] Launching a new emulator with Virtual Device 'Androidvirtual'
[2012-08-13 13:54:48 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2012-08-13 13:54:50 - Emulator] WARNING: SD Card image already in use: /home/belkacem/.android/avd/Androidvirtual.avd/sdcard.img
[2012-08-13 13:54:50 - GG] New emulator found: emulator-5554
[2012-08-13 13:54:50 - GG] Waiting for HOME ('android.process.acore') to be launched...
[2012-08-13 13:54:51 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
[2012-08-13 13:54:51 - GG] New emulator found: emulator-5556
[2012-08-13 13:54:51 - GG] Waiting for HOME ('android.process.acore') to be launched...
[2012-08-13 13:55:18 - Emulator] Failed to create Context 0x3005
[2012-08-13 13:55:18 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2012-08-13 13:55:18 - GG] emulator-5556 disconnected! Cancelling 'sync'!
[2012-08-13 13:55:20 - Emulator] Failed to create Context 0x3005
[2012-08-13 13:55:20 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2012-08-13 13:55:20 - GG] emulator-5554 disconnected! Cancelling 'sync'!

マニフェスト.xml

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

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="d" />
        </activity>
    </application>

</manifest>
4

3 に答える 3

1
No Launcher activity found!

マニフェストファイルには、アプリランチャーとして1つのアクティビティが必要です...

<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >

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

</activity>
于 2012-08-13T12:08:52.067 に答える
1

起動アクティビティを定義する必要があると思います。

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

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        </activity>
    </application>

</manifest>
于 2012-08-13T12:14:47.507 に答える
1

あなたの活動タグに挿入<category android:name="android.intent.category.LAUNCHER" />してください、これは私が推測する問題の世話をします。

于 2012-08-13T12:15:37.143 に答える