Reputation: 21
I used to program in java, but I'm new to android programming and Android Studio. I've compiled and run several app examples to my phone (4.0.3). However, I'm hitting a wall when it comes to importing libraries into an existing project. Furthermore, I'm having an extremely hard time even figuring out where to download a library in the sdk, and where the libraries reside in the sdk directory structure.
For example, I've run the default google maps example for (4.03), but now I'm trying to draw lines between waypoints, and I can't figure out how to import any of the classes given in half dozen tutorials.
For example, I can't add the following class:
import com.google.android.gms.maps.GeoPoint;
While these imports load fine:
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;
From ancient java programming experience, I was expecting to find a com/google/android/gms/maps directory structure with jar files somewhere in the SDK or workspace, but I haven't been able to nail that down. With numerous classes, I can't figure out what part of the package manager contains a class I want to import. Is there a go to site that allows me to readily figure out what sdk package I need for a given class? Is there a site that describes which google maps classes are available for a given version of android?
I don't know if this is an issue, but for the next week, my Internet access is via my tethered phone, and whenever I open Android Studio, I lose Internet access until I close it. Virtually all the tutorials I've read on this matter describe how to import your libraries from Eclipse, but I have very little experience with Eclipse either.
Thanks so much for your help. I know this is probably incredibly simple, but I've been banging my head on the table for days simply trying to figure out how to handle basic import statements and to figure out how modern java programming differs from the simple system that I was accustomed to 15 years ago.
Andrew
Upvotes: 2
Views: 70
Reputation: 1954
I'm new to Android Studio myself so not sure if this answers your question fully but I'll give it a shot.
Google Play Services
.Google Play Services
. Check it here: https://developer.android.com/google/play-services/setup.htmlUpvotes: 2