Skip to content

Building your own an *.apk

Bob edited this page Dec 11, 2013 · 6 revisions

Download and install Android Studio

Download and install Android Studio from Google.

It's possible to get Android Studio working with Eclipse and IntelliJ Idea (Android Studio is a fork of IntelliJ Idea). This guide does not cover those two IDEs.

Clone the source from GitHub

Clone the source from GitHub. The URL is https://github.com/chrislacy/TweetLanes.git

From the command line, execute the following:

git clone https://github.com/chrislacy/TweetLanes.git

Setup the Tweet Lanes project in Android Studio

  • Open Android Studio
  • From the Quick Start screen, choose "Open Project"
  • Navigate to the path you cloned Tweet Lanes
  • Within Tweet Lanes, open the android, then client folders
  • Select the client folder and click "OK"
  • Open the Project Structure (File menu, Project Structure)
  • Under the Modules group, ensure the Module SDK for each module (clientbeta, client, etc) is valid. It's currently Android 4.2.2 Platform. If that is in red on your machine, select a valid Android SDK from the drop down. Repeat for each module.
  • Click Ok
  • Now try to build. You may get a "Deprecated Make Implementation" warning. If so, go to File menu, then Settings and choose Compiler. Check "Use External Build" and then OK>
  • Build Again! You should get a bunch of errors for missing TWITTER and APPDOTNET consumer and secret keys. If those are your only errors, continue to the next step. If you get other errors, contact @Fammy

Credentials

To build and use the app, you'll need to create your own Twitter application (and App.net application, if you have a developer account).

Twitter

App.net

App.net usage requires a similar set of steps. You will need to be a registered App.net developer, which costs $100 per year.

Deploy to a device

If all has gone well, you can now deploy to a device.

  • Plug in your phone/tablet/Google TV (just kidding on the last one, but if you can get it building on Google TV I will give you a high-five emoji).
  • Under the Run menu, pick "Edit Configurations"
  • Click the Green + icon and choose "Android Application"
  • Give it a name, like "Tweet Lanes beta"
  • Under module, choose "clientbeta". You can also choose "client", but clientbeta runs side-by-side with the store version. You want clientbeta, trust me.
  • Under Target Device, pick USB Device (or Emulator)
  • Click OK.

You can now hit the green play icon (or debug next to it) and it should prompt you for the device to deploy to. You can also go to the Run menu and choose Run".