Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

installing SDK build tools before API 17 in Android Studio

When using Eclipse, I preferred to use my physical phone to test the apps. In the switch to Android Studio, I've been happy with everything except that my phone no longer works as an emulator.

Attempting to run the app through my phone returns the following error in Android Studio: Failure [INSTALL_FAILED_OLDER_SDK]

Okay, so Android Studio just needs the phone's older SDK installed, no problem. My phone runs Ice Cream Sandwich (4.04, API 15), by the way.

But here's the issue: the build tools in Android Studio's SDK only go back as far as API 17, so installing 15 from there isn't an option (the API is there, the build tools aren't). I've tried to grab the older build tools from the command line, by cd-ing to my tools directory in the SDK and then querying like so...

./android update sdk -u -a -t build-tools-15.0.0

but after checking with a dozen https://dl-ssl.google.com/android/ repositories, it spits back:

Warning: The package filter removed all packages. There is nothing to install. Please consider trying to update again without a package filter.

The minimum sdk targets in both my androidmanifest and my gradle are 14, so that shouldn't be a problem.

So, are pre-API 17 devices compatible with Android Studio, or am I tied to Eclipse for now? Is there a trick to getting these 'obsolete' build tools from Android that I haven't figured out?

Thanks for any help with this!