Topic
6 replies Latest Post - ‏2013-02-03T10:06:04Z by SystemAdmin
SystemAdmin
SystemAdmin
300 Posts
ACCEPTED ANSWER

Pinned topic Worklight Environment Issues

‏2013-02-02T09:15:45Z |
I have problem while adding android environment to IBM worklight project and the native android project folder has errors in src folder HML.java.One of these error is "The project was not built since its build path is incomplete. Cannot find the class file for android.view.KeyEvent. Fix the build path then try building this project HMLHMLAndroid Unknown Java Problem".Another error is "The type android.view.KeyEvent cannot be resolved. It is indirectly referenced from required .class files HML.java /HMLHMLAndroid/src/com/HML".
  • IdanAdar
    IdanAdar
    49 Posts
    ACCEPTED ANSWER

    Re: Worklight Environment Issues

    ‏2013-02-02T15:26:35Z  in response to SystemAdmin
    We'll need some for information here...

    Operation system? Eclipse version? Worklight version? ADT version?
    Are you referring to the Android environment and the generate Android project, or the Android Native API, from the list of options available to you after creating a Worklight project?

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      300 Posts
      ACCEPTED ANSWER

      Re: Worklight Environment Issues

      ‏2013-02-02T15:52:24Z  in response to IdanAdar
      Windows 7,Eclipse Juno 4.2.1
      ADT 21.0.1(android plugin)
      Android SDK manager4.1.2(API16)
      Worklight(Developer Edition 5.0),Firstly I created worklight project (Hybrid application)and then added worklight environment choosed android devices and tablets then the android project
      which is created automatically has errors in src files like previous post.
  • IdanAdar
    IdanAdar
    49 Posts
    ACCEPTED ANSWER

    Re: Worklight Environment Issues

    ‏2013-02-03T08:12:58Z  in response to SystemAdmin
    Here is what I have done:

    Eclipse Juno 4.2.1
    IBM Worklight 5.0.5.1
    Google ADT 21.0.1 (installed all APIs)

    1. New Worklight project, application
    2. Add Android environment
    3. Build all and deploy
    4. Launched on device (by default API level is 8 - Android OS 2.2) - OK
    5. Changed API level to 16, launched on device - OK

    Right now I cannot confirm this...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      300 Posts
      ACCEPTED ANSWER

      Re: Worklight Environment Issues

      ‏2013-02-03T08:51:16Z  in response to IdanAdar
      Now I tried your instructions the android project which is created automatically not give errors and I builded the android project then asked after the build operation "No compatible targets were found.Do you wish to add new Android Virtual Machine?"How can I understand which target is compatible?
  • IdanAdar
    IdanAdar
    49 Posts
    ACCEPTED ANSWER

    Re: Worklight Environment Issues

    ‏2013-02-03T09:13:22Z  in response to SystemAdmin
    When creating a new AVD (Android Virtual Device) in order to run your application in the Android emulator,
    You need to specify a Target in the wizard. A target is the equivilent to the API level you use your application to run against.

    If you have only API level 16 installed via the Manager, then choose API 16 from the list of available targets...

    Idan Adar
    QA Engineer
    IBM Worklight Mobile Platform
    • SystemAdmin
      SystemAdmin
      300 Posts
      ACCEPTED ANSWER

      Re: Worklight Environment Issues

      ‏2013-02-03T10:06:04Z  in response to IdanAdar
      Thank you,for answered.