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

JavaScript Introduction to React Native Implementing React Native Design Overview

FAILURE: Build failed with an exception is what I received when trying to react-native run-android

When I download the project files and attempt to make "ReactNative_Final/final_files", which we assume are the final working files - right?, I receive the following error from react-native run-android:

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring project ':app'. > The SDK directory '/Users/brandymorgan/Library/Android/sdk' does not exist.

Thanks in advance :)

3 Answers

Seth Kroger
Seth Kroger
56,413 Points

I thought they fixed this before when I discovered it in the public QA run, but if there's a setting.local file in the project's android/ directory you should remove it.

Kevin Becerra
Kevin Becerra
14,243 Points

When you downloaded the project files were all the packages needed to run this app already installed onto your computer? p.s. I see that you're new to treehouse, I don't know if you have had past experience with javascript but if you haven't I would recommend starting with a different course to learn the basics of the language first before diving into this.

Kevin - I've developed android and javascript applications for years and yes, while I am new to react-native, I've already setup my linux machine with the android and react tools - I can build a small app using facebooks how-to pages and run it on an android device using react-native run-android. So... I'm not sure how understanding 'something', which you can't specify, will help me run this demo app which is in the 'final' directory - is it not 'final'? - have YOU run the same app from the same directory I tried? Perhaps you should try compiling the app for yourself to see what I see - either a dependency which is not included or a blatant error in a 'getting started' type app. Thanks Rich

Thank you Seth - In ReactNative_Final/final_files/android I renamed local.properties (there was no setting.local but you prompted to poke around and in local.properties is sdk.dir=/Users/brandymorgan/Library/Android/sdk which is what the error complained about so) to local.properties.txt and it then compiled and I can now continue with the videos. So kudos to you all at teamtreehouse - this is the first android demo on the internet I've been able to download and compile. A+ and your video by Brandy Bergh is the absolute best introduction to react-native of all time as well as the article which brought me to teamtreehouse by Amit Bijlani titled An Introduction to React-Native - you all really got to the meat of the subject matter. Kudos! Really! I will sign up for one month :)