如何在Android模拟器上运行PhoneGap应用程序?

时间:2014-03-05 18:30:26

标签: android cordova

我无法在Android模拟器上运行phoneGap应用程序, 我正在按照一步一步的流程 - http://docs.phonegap.com/en/2.9.0/guide_getting-started_android_index.md.html

但我收到了错误

Description Resource    Path    Location    Type
Config cannot be resolved   PhoneGapdemo.java   /PhoneGapdemo/src/com/appovative/testpgap   line 32 Java Problem
DroidGap cannot be resolved to a type   PhoneGapdemo.java   /PhoneGapdemo/src/com/appovative/testpgap   line 25 Java Problem
DroidGap cannot be resolved to a type   PhoneGapdemo.java   /PhoneGapdemo/src/com/appovative/testpgap   line 30 Java Problem
The import org.apache.cordova cannot be resolved    PhoneGapdemo.java   /PhoneGapdemo/src/com/appovative/testpgap   line 23 Java Problem
The method onCreate(Bundle) of type PhoneGapdemo must override or implement a supertype method  PhoneGapdemo.java   /PhoneGapdemo/src/com/appovative/testpgap   line 28 Java Problem

1 个答案:

答案 0 :(得分:0)

您使用旧的2.9版本有特殊原因吗?

无论如何,我认为你的问题是,phonegap 2.9.1发生了变化,api不再是一个jar,而是在另一个名为cordova-lib的项目中。在eclipse中导入项目时,您应该看到两个项目而不是一个。添加这两个项目可以解决您的问题。