I have been following the steps to try and deploy the WebSphere Commerce V7 Feature Pack 4 Native Android application.
Although this was not the first issue I encountered but the last, the first thing to do is make sure the JDK you use is 1.6. I initially had 1.7 setup it was the latest and greatest when I followed the instructions for setting up the SDK that the Info Centre pointed me at. Given there are no instructions on how they have written the sample app on the IBM site, made sense to me. But once I resolved the two problems below I had a whole load of red errors about
the method onCLick(view) of type new …
A Google on this indicated along the lines of this, especially when I looked at the code flagging the errors
Since Java 1.6 the annotation @Override is not only possible for inherited methods from a superclass but also for implemented methods from an interface. But if your compiler is still set to 1.5 the problem is that he will check if you’re overwriting a method from a super class.
So my guess is in 1.7 something changed again. Once I got the 1.6 JDK installed and set up within Eclipse and cleaned the project all the errors went, just a few warnings left. So get 1.6 for your JDK not 1.7.
Next when I installed the Android SDK it download the latest API 14 files. I installed Eclipse set the Path and as soon as I imported the Android Application I got the following error
Madisons-AndroidNativeMobile Unable to resolve target ‘Google Inc.:Google APIs:8′
What this means is I am missing the Level 8 API’s and have to import them into the Eclipse environment. You can either use the Window – Android SDK Manager option within the Eclipse environment. Otherwise use the Android SDK Manager itself. I did find that until I closed and then opened the Eclipse environment I still had the error, not sure if you will get the same thing. Just make sure the SDK manager reloads everything OK.
Then when I restarted I now saw a different error, now this is due to me having 1.7 installed but worth a mention. if you go with 1.6 you won’t see this.
Madisons-AndroidNativeMobile] Android requires compiler compliance level 5.0 or 6.0. Found ’1.4′ instead. Please use Android Tools > Fix Project properties.
You can find this by right clicking on the project and it is near the bottom if the options. if you look in the properties of the application as well and click on ‘Java Compiler’ you can see the compiler compliance level if you let the environment do the setting it goes to 1.5 (V5) you can select 1.6 (6) this seems to be OK. Not sure if it is best to be on 6 or not?
Hopefully I can now build and deploy the app and see what it does.