Eclipse を使用して、最初の Phone Gap アプリケーションをセットアップして実行しようとしています。これは私がフォローしているチュートリアルです(http://wiki.phonegap.com/w/page/34483744/PhoneGap-Eclipse-PlugIn-for-Android)。しかし、うまくいかないようです。アプリを起動しても何も起こらず、以下はコンソール出力です
[2012-06-28 16:14:05 - MyProjectName] ------------------------------
[2012-06-28 16:14:05 - MyProjectName] Android Launch!
[2012-06-28 16:14:05 - MyProjectName] adb is running normally.
[2012-06-28 16:14:05 - MyProjectName] No Launcher activity found!
[2012-06-28 16:14:05 - MyProjectName] The launch will only sync the application package on the device!
[2012-06-28 16:14:05 - MyProjectName] Performing sync
[2012-06-28 16:14:05 - MyProjectName] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'AVD15'
[2012-06-28 16:14:08 - MyProjectName] Application already deployed. No need to reinstall.
[2012-06-28 16:14:08 - MyProjectName] \MyProjectName\bin\MyProjectName.apk installed on device
[2012-06-28 16:14:08 - MyProjectName] Done!
EDITED:Rajeshによるアドバイスとして「Create Activity」チェックボックスをオンにした後のファイルとコンソール
アクティビティ.java
package my.com.phonegap;
import android.app.Activity;
import android.os.Bundle;
public class MyPhonePrjActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
}
マニフェスト.XML
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="my.com.phonegap"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".MyPhonePrjActivity"
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>
コンソール出力
[2012-06-28 17:54:26 - MyPhonePrj] ------------------------------
[2012-06-28 17:54:26 - MyPhonePrj] Android Launch!
[2012-06-28 17:54:26 - MyPhonePrj] adb is running normally.
[2012-06-28 17:54:26 - MyPhonePrj] Performing my.com.phonegap.MyPhonePrjActivity activity launch
[2012-06-28 17:54:26 - MyPhonePrj] Automatic Target Mode: launching new emulator with compatible AVD 'AVD15'
[2012-06-28 17:54:26 - MyPhonePrj] Launching a new emulator with Virtual Device 'AVD15'
[2012-06-28 17:54:39 - Emulator] emulator: emulator window was out of view and was recentered
[2012-06-28 17:54:39 - Emulator]
[2012-06-28 17:54:39 - HelloAndroid] New emulator found: emulator-5554
[2012-06-28 17:54:39 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...
[2012-06-28 17:54:47 - Emulator] NAND: nand_dev_load_disk_state ftruncate failed: Invalid argument
[2012-06-28 17:54:47 - Emulator] savevm: unable to load section nand_dev
[2012-06-28 18:01:23 - HelloAndroid] HOME is up on device 'emulator-5554'
[2012-06-28 18:01:23 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'
[2012-06-28 18:01:23 - HelloAndroid] Installing HelloAndroid.apk...
[2012-06-28 18:03:34 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!
[2012-06-28 18:03:34 - HelloAndroid] (null)
[2012-06-28 18:03:35 - HelloAndroid] Launch canceled!