1

We are currently using Worklight Enterprise Edition running in Windows. We created a mobile application using jQuery Mobile (and another Using Dojo Mobile) but we were unable to deploy it to a the device.

  • After developing the application we generated the (unsigned) .apk file
  • We copied it to Samsung Grand (android version 4.1.2) to test it
  • When we try to open the .apk file, we get the error: There is a problem parsing the package.

Is this the correct procedure to install the .apk file in device?

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
Manoj
  • 23
  • 1
  • 4

1 Answers1

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.
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • Thanks for the info Idan, In our environment we are not able to connect the mobile device to the computer using USB cable(all usb ports are blocked). So we need to develop the app seperately and need to manually copy the generated apk file to the mobile device. Please help to acheive this. – Manoj Jul 04 '13 at 04:38
  • Setup an email account on the device and email the .apk to yourself. Tapping it 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. – Idan Adar Jul 04 '13 at 04:47
  • Hi Idan, Is there any other way of installing .apk file in the device other than using the app "ADB Wireless" I have just created an app having front end design using JQuery mobile without using any adapters. I have got the .apk file for android environment, While I try to install it in android device, It displayed "Problem in Parsing the packages" ? – Manoj Jul 04 '13 at 10:44
  • In your device settings search for the option to install applications from "Unknown Sources". – Idan Adar Jul 04 '13 at 11:01
  • Thanks for the info Idan. yes, we have enabled the option for installing from unknown sources. still we are getting the same issue. – Manoj Jul 04 '13 at 12:31
  • Run the application in an Android Emulator, does it work there? – Idan Adar Jul 04 '13 at 12:35
  • I've added another option to my answer. see if it helps. – Idan Adar Jul 05 '13 at 02:43
  • In andriod emulator the application runs fine, we are facing this issue only with the mobile device. we will install API level 8 will let you know the outcome. – Manoj Jul 05 '13 at 03:53
  • we have already installed andriod API level 17. shall we proceed to downgrade it to 8? – Manoj Jul 05 '13 at 04:13
  • Don't delete the API Level 17; simply install in addition API Level 8. Then, edit AndroidManifest.xml to point to 8. What kind of AVD (emulator) did you create? What Android version is it based on? – Idan Adar Jul 05 '13 at 04:54
  • We are using ARM type of andriod emualtorand Andriod Version 4.2.2. (API level 17). We are unable to install the andriod API level 8 as our andriod SDK manager is not allowing the inatallation. Kindly help us to proceed. – Manoj Jul 09 '13 at 06:05
  • Thanks for the info Idan, We will try this in another machine and will update. – Manoj Jul 10 '13 at 05:51
  • @Manoj, if this answer helped you resolve your problem, please mark it as Answered. – Idan Adar Sep 06 '14 at 15:38