0

I'm trying to use Maven for new projects, but this thing is confusing me at all.

In all examples they only use the Android default APIs, but I need the Google API as my application uses Google Maps. How can I use Google APIs?

This is an existing Android Project made on Eclipse (now I'm trying to use IntelliJ IDEA) and I'd like to start using Maven, so how can I convert the existing Project to Maven?

Thanks.

juliano.net
  • 7,982
  • 13
  • 70
  • 164

3 Answers3

2

To convert an Eclipse project to a Maven project, select the Java project in Eclipse and popup the context menu, then select "Configure" > "Convert to Maven Project".

reprogrammer
  • 14,298
  • 16
  • 57
  • 93
  • 1
    This is causing an error. I cannot change the packaging attribute to APK and the google android dependency is not recognized. – juliano.net Dec 07 '12 at 16:15
  • I'm getting this on Eclipse: "Project build error: Unknown packaging: apk" and "Missing artifact com.google.android:android:jar:17" – juliano.net Dec 08 '12 at 12:08
  • That seems like a different issue. See http://stackoverflow.com/q/11023252 and http://stackoverflow.com/q/10610564. – reprogrammer Dec 09 '12 at 17:43
  • Some description of how to fill in the resulting form would be helpful. Does "version" matter? What about "Packaging"? – Brian White May 24 '15 at 01:21
1
  1. The maven-android-plugin aka android-maven-plugin talks about how to maven-ize your android project. http://code.google.com/p/maven-android-plugin/wiki/GettingStarted
  2. The Add-Ons such as maps, usb, gcm you'd need to use the maven-android-sdk-deployer. The documents spells out the exact xml to use in pom.xml https://github.com/mosabua/maven-android-sdk-deployer
Nagesh Susarla
  • 1,660
  • 10
  • 10
0

For the question about Google Api just put the following code in the application tag of your AndroidManifest file

<uses-library android:name="com.google.android.maps" />

for the second question, i recommend you to make first the conversion in eclipse following this tutorial http://steveliles.github.com/converting_eclipse_adt_android_projects_to_build_with_maven.html and after that you can import your maven project into IntelliJ IDEA

Festus Tamakloe
  • 11,231
  • 9
  • 53
  • 65