私は現在、推奨されている Eclipse と ADK を使用して単純な Android アプリケーションを開発しようとしています。開発ツールは非常に更新されていると確信しています。しかし、単純な Hello World アプリケーションを作成して、作成したエミュレーターで実行しようとすると、ランチャー アクティビティが見つからないという問題が解消されません。Android マニフェストを確認したところ、Launcher アクティビティが既に作成されていることがわかりました。コードは次のとおりです。
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.helloworld.Activity_1"
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>
</manifest>
戻り値:
[2014-07-16 19:24:02 - HelloWorld] Android Launch!
[2014-07-16 19:24:02 - HelloWorld] adb is running normally.
[2014-07-16 19:24:02 - HelloWorld] No Launcher activity found!
[2014-07-16 19:24:02 - HelloWorld] The launch will only sync the application package on the device!
[2014-07-16 19:24:02 - HelloWorld] Performing sync
[2014-07-16 19:24:02 - HelloWorld] Automatic Target Mode: launching new emulator with compatible AVD 'AVD'
[2014-07-16 19:24:02 - HelloWorld] Launching a new emulator with Virtual Device 'AVD'
[2014-07-16 19:24:17 - Emulator] emulator: device fd:612
[2014-07-16 19:24:17 - Emulator]
[2014-07-16 19:24:17 - Emulator] HAX is working and emulator runs in fast virt mode
[2014-07-16 19:24:27 - Emulator] emulator: warning: opening audio input failed
[2014-07-16 19:24:27 - Emulator]
[2014-07-16 19:24:27 - HelloWorld] New emulator found: emulator-5554
[2014-07-16 19:24:27 - HelloWorld] Waiting for HOME ('android.process.acore') to be launched...
この種の質問がかなり多いかもしれないことを私は知っています。多くの回答とチュートリアルに従いましたが、それでもこのエラーを取り除くことはできません。誰でも私を助けることができますか?
改善された新しいコード:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.helloworld.MainActivity"
android:label="@string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.helloworld.DisplayMessageActivity"
android:label="@string/title_activity_display_message"
android:parentActivityName="com.example.helloworld.MainActivity" >
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.myfirstapp.MainActivity" />
</activity>
</application>
</manifest>
戻り値:
[2014-07-16 19:34:00 - HelloWorld] Android Launch!
[2014-07-16 19:34:00 - HelloWorld] adb is running normally.
[2014-07-16 19:34:00 - HelloWorld] No Launcher activity found!
[2014-07-16 19:34:00 - HelloWorld] The launch will only sync the application package on the device!
[2014-07-16 19:34:00 - HelloWorld] Performing sync
[2014-07-16 19:34:01 - HelloWorld] Automatic Target Mode: launching new emulator with compatible AVD 'AVD'
[2014-07-16 19:34:01 - HelloWorld] Launching a new emulator with Virtual Device 'AVD'
[2014-07-16 19:34:21 - Emulator] emulator: device fd:612
[2014-07-16 19:34:21 - Emulator]
[2014-07-16 19:34:21 - Emulator] HAX is working and emulator runs in fast virt mode
[2014-07-16 19:34:23 - Emulator] emulator: warning: opening audio input failed
[2014-07-16 19:34:23 - Emulator]
[2014-07-16 19:34:26 - HelloWorld] New emulator found: emulator-5554
[2014-07-16 19:34:26 - HelloWorld] Waiting for HOME ('android.process.acore') to be launched...
[2014-07-16 19:36:08 - HelloWorld] emulator-5554 disconnected! Cancelling 'sync'!