-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring Development Environment
- Install any version of Git for Windows if not previously installed.
- Run the Git Bash once installation is completed.
- Navigate to a folder where you want to store the project files. I would choose either
C:\orC:\Users\user\Documents\. Note that in the Git Bash directories inC:\must be accessed with forward slashes, for examplecd /c/Users/user/Documents. -
git clone https://github.com/wnayes/app-challenge-android.git
The repository should now be in aapp-challenge-androidfolder.
- Either install the Android SDK and Eclipse manually or grab the ADT Bundle.
- Library files are not included in the repository, but need to be added to build. Copy the file
<sdk-folder>/extras/android/support/v4/android-support-v4.jarintorepository\app\libs\. The SDK folder is the location of the Android SDK downloaded previously. - You may have to also add it as an "External JAR" from the Libraries -> Java Build Path configuration.
- Import the project into Eclipse. From
File -> Import, selectExisting Android Code into Workspace. The root folder is theappdirectory.
There are a few extra steps to prevent the application from crashing with Maps in an Activity.
- You will need to get a Google Maps API Key for yourselves. One tricky part was finding the
keytoolapplication; it was in theC:\Program Files\Java\jdk_*\bin\for me. You will need to get the SHA-1 hash output and create a new Android key from the Google API Console. - We will each have separate keys (not committed to the repository). So to configure this, create a
maps_key.xmlfile inapp\res\values. In this file, write:
`
We currently have a compatibility library for using the ActionBar UI in android releases predating Honeycomb. This is another library that needs to be downloaded, added to the Eclipse workspace, and added to the main project before compiling. For more information, see the library website.
Unfortunately, it seems it is also a huge ordeal to get apps using the new Maps API v2 to keep from crashing/displaying a message about Google Play Services needing to be installed. If you can find access to a physical device to run the app on, it should work with no issue. There are workarounds to get the emulator working; I tried some workarounds from here and they seemed to work (at least temporarily?). It sounds like there could be updates to the SDK making this unnecessary but for now it is.