How to setup an Android development environment using STS, Android SDK, Maven and Spring Android -


this quick howto on setting android development environment including sts, android sdk, spring android, maven.

1)  install latest sts (currently 3.4.0) 2)  setup android development environment in sts per normal android development setup steps existing ide: http://developer.android.com/sdk/installing/index.html 3)  above step, save time copying “android-sdk” folder developer has setup environment, , point sts android folder (window-->preferences-->android-->sdk location) 4)  install m2e-android per: http://rgladwell.github.io/m2e-android/  create sample android application using maven 1)  in sts, click on file-->new-->maven project 2)  select workspace location , click next 3)  maven archetype, select “android-quickstart” , click next. archetype should exist if added archetype according to: http://rgladwell.github.io/m2e-android/ 4)  fill in desired maven project details , click next. 5)  in pom.xml, set "platform.version" tag value 4.1.1.4 6)  right click on project , select build project. 7)  right click on project , select run  android application. 8)  should start android emulator , deploy ‘hello world’ application.  making use of spring android libraries in android application: 1)  using maven, follow instructions here configure dependencies: http://projects.spring.io/spring-android 2)  there seems error using above dependencies is. error given when trying run android application in sts, says “multiple dex files define lorg/springframework/core/errorcoded”.  means duplicate classes referenced on classpath.  avoid error, remove maven dependency element “spring-android-auth”.  using resttemplate spring android libraries: 1)  reference documentation gives need: http://docs.spring.io/spring-android/docs/1.0.1.release/reference/html/rest-template.html 2)  remember android application must register correct message converter. eg: resttemplate.getmessageconverters().add(new mappingjackson2httpmessageconverter()); 3)  note android application must include uses-permission “android.permission.internet” allow network calls. 


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -