errors configuring sample app

Hi,

I am trying to run the sample app using adt (android eclipse). I imported the example project and then added the api jar to the build path as instructed in the documentation. I am not able to compile because there are many errors like these:

Description    Resource    Path    Location    Type
Axis cannot be resolved    AccelerometerFragment.java    /MetaWearApp/src/com/mbientlab/metawear/app    line 210    Java Problem

Description    Resource    Path    Location    Type
Battery cannot be resolved to a variable    DeviceInfoFragment.java    /MetaWearApp/src/com/mbientlab/metawear/app    line 95    Java Problem

Description    Resource    Path    Location    Type
BytesInterpreter cannot be resolved    AccelerometerFragment.java    /MetaWearApp/src/com/mbientlab/metawear/app    line 305    Java Problem

What am I missing?

Thanks!

Comments

  • Thanks.

    How do I properly add the API to the sample project. I manually added the updated jar file to the build path, is that enough?

    Using the new jar file, I am hitting even more errors:

    Description    Resource    Path    Location    Type
    Accelerometer cannot be resolved to a type    AccelerometerFragment.java    /MetaWearApp/src/com/mbientlab/metawear/app    line 101    Java Problem

    Description    Resource    Path    Location    Type
    AnalogMode cannot be resolved to a variable    GPIOFragment.java    /MetaWearApp/src/com/mbientlab/metawear/app    line 130    Java Problem

  • Adding the jar to the build path is sufficient.  You should also clean the project as well after swapping in the jar.
  • Adding the jar file to the build path is not working for some reason. I still see many errors. I instead added the api as a reference and that seems to have resolved most of the errors.

    I now see several of these errors "case expressions must be constant expressions." I followed the suggestion and converted the case expressions to if else but that results in type mismatch errors.
This discussion has been closed.