2012-06-28 42 views
0

可能重复:
adding jquery.min.js file to phonegap eclipse application间隙应用基于Eclipse

我一直在试图建立和运行与Eclipse我的第一个电话间隙应用。这是我正在关注的教程(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! 

编辑:检查由拉杰什“创建活动”复选框作为建议

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); 
} 
} 
后的文件和控制台

的Manifest.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! 

回答

1

您的项目似乎没有启动器活动。如果您在创建项目时未创建活动,可能会发生这种情况 - 可能您忘记检查“创建活动”复选框。请确认您正在创建活动。

如果这不起作用,请使用您的活动代码以及AndroidManifest.xml的内容更新您的问题。

+0

你是对的,我忘了检查“创建活动”复选框。它进展并显示我模拟器,但没有输出。请参阅我在问题 – LivingThing

+0

中所做的修改这一次,AVD似乎有问题。删除并重新创建AVD,然后重试。 – Rajesh