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 trialglenn romaniuk
32,521 PointsAndroid studio code example - Updating the Main Layout - download code does not work
i'm new to android studio so i'm not sure how to fix
I downloaded the sample code when I load into android studio it displays the following message
"the path \users\benjakuben\development\antroid-sdk does not refer to an anroid sdk" it tells me it will use the default path c:\program files\android-studio\sdk
verified the path exists
if i build the project it displays the following error
unsupportedmethodexception - failed to set up android module sin project stormy: unsupported method: baseartifact.getjavacompiletaskname(). the versio nof gradle you connect to does not support that method. to resolve th eprblem you can change/upgrade the targe versio of gradle you connect to. alternatively, you can ignore this exception and read other information from the model.
How can i get this to run?
2 Answers
Ben Deitch
Treehouse TeacherMost likely that project was built using an older version of gradle than you currently have. Does this video (start at about 2:20) solve the problem?
glenn romaniuk
32,521 PointsI only have the one version that i downloaded from the video download link. As in your scenario where you compare it to an earlier version I have only one version. Any ideas?
glenn romaniuk
32,521 Pointshere's the initial error i get when trying to sync the gradle
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find com.android.support:appcompat-v7:21.0.2. Searched in the following locations: https://jcenter.bintray.com/com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.pom https://jcenter.bintray.com/com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.jar file:/C:/Program Files/android-studio/sdk/extras/android/m2repository/com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.pom file:/C:/Program Files/android-studio/sdk/extras/android/m2repository/com/android/support/appcompat-v7/21.0.2/appcompat-v7-21.0.2.jar Required by: StormyLists:app:unspecified
Ben Deitch
Treehouse TeacherHmm, if you go into the SDK manager do you have both the Android Support Repository and Android Support Library installed?