Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 4.13 KB

TROUBLESHOOTING.md

File metadata and controls

65 lines (42 loc) · 4.13 KB

Troubleshooting

Things not going well building the project? See the known issues below and some solutions. If you're a user of the app, check out our FAQ.

Building the project takes forever (like, 4 minutes) - what's up?

In your gradle.properties file in the root of the project, add:

org.gradle.jvmargs=-Xmx2048m

This must be at least 2 Gb to take advantage of Dex In Process. See this post for more info.

When running the project, I get a NullPointerException in BaseMapFragment, related to mMap

You're most likely trying to run the obaAmazon build variant on an Google Android device, or the obaGoogle build flavor on an Amazon device.

To build the version of OneBusAway on Google Play, you'll want to select the obaGoogleDebug build variant.

Steps to set the build variant:

  • In Android Studio, you'll see a "Build Variant" button on the very left side of the screen, collapsed in the dock. Click on this, and select either obaGoogleDebug for Google devices, or obaAmazonDebug for Amazon devices:
  • From the command line, run gradlew installObaGoogleDebug for Google devices, or gradlew installObaAmazonDebug for Amazon devices.

Android Studio build variants

See the documentation at the top of the readme for more information on building via Android Studio or the command line.

When running the project I get prompted to install Amazon Maps. I already have Google Maps installed. What's going on?

This is likely due to running the obaAmazon build variant on an Google Android device. See the top troubleshooting question, and make sure you select the obaGoogleDebug build variant.

When running the project I get prompted to install Google Play Services. I have an Amazon Fire Phone that doesn't have Google Play Services. What's going on?

This is likely due to running the obaGoogle build variant on an Amazon Fire Phone. See the top troubleshooting question, and make sure you select the obaAmazonDebug build variant.

When importing to Android Studio, I get an error "You are using an old, unsupported version of Gradle..."

If you're using Android Studio v0.4.2 or lower, when importing, please be sure to select the settings.gradle file in the root, NOT the project directory. You will get the above error if you select the project directory / name of the project.

I get build errors for the Android Support libraries or Google APIs

Open the Android SDK Manager and make sure the following are installed:

  • Under Tools
    • Android SDK Tools
    • Android SDK Platform-tools
    • Android SDK Build-tools
  • Under the currently used SDK version (see compileSdkVersion in onebusaway-android/build.gradle)
    • SDK Platform
    • Google APIs
  • Extras
    • Android Support Repository
    • Android Support Library
    • Google Play services
    • Google Repository

Android Studio or Gradle can't find my Android SDK, or the API Levels that I have installed

Make sure that you're consistently using the same Android SDK throughout Android Studio and your environmental variables. Android Studio comes bundled with an Android SDK, and can get confused if you're pointing to this SDK within Android Studio but have your environmental variables pointed elsewhere. Click "File->Project Structure", and then under "Android SDK" make sure you "Android SDK Location" is the correct location of your Android SDK.

Also, make sure you've set the ANDROID_HOME environmental variable to your Android SDK location and the JAVA_HOME environmental variables to point to your JDK folder.