We are making an Android application and we want to use a library called EasyNFC (https://github.com/Mobisocial/EasyNFC).
We’re having a load of trouble, however, getting everything to play nicely together. We would like to have EasyNFC available in Eclipse so that we can reference the library from our Android project, but while also maintaining the ability to pull updates (i.e. we don’t want to keep copy/pasting). Issues:
- EasyNFC is a Maven project (We are already using m2eclipse)
- EasyNFC is hosted on Git (We are already using the m2e Git connector)
- EasyNFC is meant to be used as an Android library but is NOT an Eclipse project
Is there an easy way to import EasyNFC as a Maven/Git/Android project into Eclipse?
EasyNFC is meant to be used as an Android library but is NOT an Eclipse project.
I checked out its pom.xml and have a play with it.
Is there an easy way to import EasyNFC as a Maven/Git/Android project into Eclipse?
Suppose you use latest Android SDK & ADT version, in Eclipse (requires m2eclipse), simply import it as a regular mavenized java project:
File -> Import ... -> Maven -> Existing Maven Projects, once done, you can see easynfc in Package Explorer has icon marked with capital M and J, which means a Mavenized Java project.In Android project, add easynfc project into project build path:
Properties -> Java Build Path -> Projects -> Add ...then export easynfc project: to build class path:Properties -> Java Build Path -> Order and Export.Now you should able to use easynfc in your Android project and build/run/debug it in Eclipse.
Hope this helps.