我遵循基本Phonegap教程(Eclipse,Android SDK,ADT Phonegap)中的所有步驟,我在assets/www
文件夾中創建了index.html
頁面(來自phonegap站點的代碼)和cordova-2.2.0.js
, cordova-2.2.0.jar
,當我跑它,它表明這個消息康壽屏幕上:phonegap簡單的例子不能在android模擬器中工作
[2013-09-05 12:44:14 - phonegape-test] ------------------------------
[2013-09-05 12:44:14 - phonegape-test] Android Launch!
[2013-09-05 12:44:14 - phonegape-test] adb is running normally.
[2013-09-05 12:44:14 - phonegape-test] No Launcher activity found!
[2013-09-05 12:44:14 - phonegape-test] The launch will only sync the application package on the device!
[2013-09-05 12:44:14 - phonegape-test] Performing sync
[2013-09-05 12:44:14 - phonegape-test] Automatic Target Mode: launching new emulator with compatible AVD 'STest'
[2013-09-05 12:44:14 - phonegape-test] Launching a new emulator with Virtual Device 'STest'
[2013-09-05 12:44:27 - phonegape-test] New emulator found: emulator-5554
[2013-09-05 12:44:27 - phonegape-test] Waiting for HOME ('android.process.acore') to be launched...
[2013-09-05 12:46:25 - phonegape-test] HOME is up on device 'emulator-5554'
[2013-09-05 12:46:25 - phonegape-test] Uploading phonegape-test.apk onto device 'emulator-5554'
[2013-09-05 12:46:26 - phonegape-test] Installing phonegape-test.apk...
[2013-09-05 12:47:35 - phonegape-test] Success!
[2013-09-05 12:47:35 - phonegape-test] \phonegape-test\bin\phonegape-test.apk installed on device
[2013-09-05 12:47:35 - phonegape-test] Done!
,但應用程序沒有作用,我沒有找到我的應用程序圖標lancher!請你幫助我!
編輯: MainActivity.java:
package com.example.phonegape;
import android.os.Bundle;
import android.view.Menu;
import org.apache.cordova.*;
//import com.phonegap.DroidGap;
public class MainActivity extends DroidGap {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.init();
super.loadUrl("file:///assets/www/index.html");
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
你說的 「不工作」 是什麼意思?有沒有空白的屏幕或什麼?應用程序中斷?請明確說明。 – Math
沒有空白屏幕,沒有應用程序中斷!模擬器已啓動且沒有任何事情發生 – Nomade
你能發佈你的活動嗎? (我想你只有一個吧?) – Math