Qubit Posted July 27, 2016 Posted July 27, 2016 http://stackoverflow.com/questions/38620043/trying-to-use-google-map-api Have been searching for hours for a solution, hopefully someone here knows one.
Botre Posted July 27, 2016 Posted July 27, 2016 (edited) How did you import the lib? Jar? Maven? Gradle? Edit: then right clicked gradle project in project explorer and exported as a jar, then imported that jar into my projects libraries. Don't do that... Google how to use gradle :p Or just use maven: <dependency> <groupId>com.google.maps</groupId> <artifactId>google-maps-services</artifactId> <version>(insert latest version)</version> </dependency> Maven is love. Edited July 27, 2016 by Botre 1
Qubit Posted July 27, 2016 Author Posted July 27, 2016 How did you import the lib? Jar? Maven? Gradle? Edit: then right clicked gradle project in project explorer and exported as a jar, then imported that jar into my projects libraries. Don't do that... Google how to use gradle :p Or just use maven: <dependency> <groupId>com.google.maps</groupId> <artifactId>google-maps-services</artifactId> <version>(insert latest version)</version> </dependency> Maven is love. I used eclipse to build the gradle project, which then showed up in project explorer, which I then exported to a jar. Which is used in my project. Was this the wrong way to do it? Could you give me a example how I would do this?
Botre Posted July 27, 2016 Posted July 27, 2016 I used eclipse to build the gradle project, which then showed up in project explorer, which I then exported to a jar. Which is used in my project. Was this the wrong way to do it? Could you give me a example how I would do this? Yes it was the wrong way to do it, you can google Gradle if you want to learn more but I would deffo suggest Maven over Gradle: Create new Maven project, open pom.xml, paste the dependency, done. 1
Qubit Posted July 27, 2016 Author Posted July 27, 2016 Yes it was the wrong way to do it, you can google Gradle if you want to learn more but I would deffo suggest Maven over Gradle: Create new Maven project, open pom.xml, paste the dependency, done. Using maven, I added the dependency code you gave me but where do i put the google api project?
Botre Posted July 27, 2016 Posted July 27, 2016 Using maven, I added the dependency code you gave me but where do i put the google api project? Maven takes care of every thing. Fill in pom.xml. Optional (in case you don't have auto-update enabled for maven): Right-click project -> maven -> update project. Maven will download everything that is required and add it to your project. Start coding. 1