1

我们目前正在使用在 Windows 中运行的 Worklight Enterprise Edition。我们使用 jQuery Mobile(和另一个使用 Dojo Mobile)创建了一个移动应用程序,但我们无法将它部署到设备上。

  • 开发应用程序后,我们生成了(未签名的).apk 文件
  • 我们把它复制到三星Grand(安卓版本4.1.2)来测试它
  • 当我们尝试打开 .apk 文件时,我们收到错误:There is a problem parsing the package.

这是在设备中安装 .apk 文件的正确程序吗?

4

1 回答 1

6

Try the following:

  • Make sure the device is setup for development. Follow these instructions to enable so.

    1. Connect your device to the computer using a USB cable
    2. In Eclipse, make sure that the device is recognized in the Devices view (Ctrl+3 and search for "Devices" to add the panel).
    3. Right-click on your Worklight application and choose Run As >> Build All and Deploy
    4. Right-click on the generated Android project (should appear below the Worklight project) and choose Run As >> Android Application

This will generate an unsigned .apk and install it onto the device.
Observe LogCat (Ctrl+3 and search for "LogCat" to add the panel) for errors.

If you cannot connect the device to the computer:

  • Make sure the enable the option to allow installing applications from "Unknown Sources".
  • Setup an email account on the device and email the .apk to yourself. Tapping the attached .apk should then install it.
  • Alternatively, and only if your device is rooted, you can use an app called ADB Wireless, which allows remote installing and debugging of applications.

As a final attempt,

  • From the Android SDK Mananger, install API Level 8.
  • Go to the android\native\AndroidManifest.xml file and change minSdkValue to 8.
  • Build and deploy, install on device.
于 2013-07-03T06:18:23.793 回答