Sunday, 24 May 2015

Getting back into Android development

After learning both iOS and Android development about 18 months ago we've not really had many enhancements needed in our mobile applications, with any changes just needing our existing knowledge. In reality this has probably meant my knowledge has actually decayed; which is a shame given the challenge of intially learning mobile development we went through. To try and remedy this; as a side project I'm looking to rebuild our existing application from scratch with an updated UI. Our current application is built using Eclipse and has a standardised screen for all format which only works in portrait mode. So as part of this work I want to "improve" the UI so it makes use of the additional real estate of larger screens and landscape mode. I also want to see how Android studio works to see if it is worth porting the application across and making that our standard Android IDE.

It's always fun starting out with a new, empty project. Typically you do hope that everything will just work, which wasn't the case this time around. Opening the new project displayed 3 errors; the first two were that the project requires Java 7 to be installed and that it should be compiled against JDK7. As I already had Java 8 installed; I did a quick dig around (a Google search) and found the following Stack Overflow article. So updated the path and that resolved the first errors. The next error occurred when trying to view the activity; which failed with an error "java.lang.NoClassDefFoundError: android.support.v7.appcompat.R$styleable". Again looking online I found this Stack Overflow article which solved the problem, for some reason the view wouldn't render when set to be the most recent API; backing it down sorted out the problems.

So now the project compiles and deploys to my device, let the fun begin.

No comments:

Post a Comment