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 trialJodie Wong
3,522 PointsGradle sync fail
I keep getting a message at the top of my project: "Gradle project syn failed. Basic functionality (eg editing debugging) will not work properly ".
Also this shows up in the messages:
Error:Could not find any version that matches com.android.tools.build:gradle:0.12.+. Required by: :TakingInputs:unspecified
4 Answers
danielplaisimnd
6,837 Pointsgo inside build.gradle add the following claspath and remove the + sign classpath 'com.android.tools.build:gradle:0.12.2'
James Beleau
1,633 PointsOK, about a week ago I started this lesson and saw the tons of "Gradle Build fail" questions with zero real answers. So I did what any unreasonable engineer would do. I spent about 4 hours beating up every answer on the internet.
- I reinstalled the latest version of andriod studio.
- I turned off my firewall, etc.
- I tried secret key codes in the settings and ini file changes (which reminds me, I need to go reverse one of these).
- I logged off fruitless and cried myself to sleep in failure.
So a week later, here I am. Doing it again. On attempt 2 of the night, Victory.
What worked; http://stackoverflow.com/questions/19889503/android-studio-cannot-start-internal-http-server
- Run "CMD" prompt as administrator.
- Type "netsh winsock reset", hit enter.
- Restart your computer.
What does this do? http://www.experts-exchange.com/Networking/Misc/Q_21545829.html "This command resets the Winsock catalog to the default configuration. This can be useful if a malformed LSP is installed that results in loss of network connectivity. While use of this command can restore network connectivity, it should be used with care because any previously-installed LSPs will need to be re-installed."
danielplaisimnd
6,837 Pointsreplace that line with the following and it will work fine: dependencies { classpath 'com.android.tools.build:gradle:0.12.2' }
Natesh Iyer
771 PointsThe presenter is doing something wrong. You are continuing to use MAC while we have finished installing JDK and ASP in Windows. So guy, please note before going to creating the project please turn off your windows anti-virus firewall as ASP downloads GRADLE and thus if this gets blocked you will get many errors I had the firewall turned off and all is working fine.
You must also mention what is the basic PC requirements as my PC with 4GB RAM and windows 7 32 bit home Edition the application is running very slow.
Jodie Wong
3,522 PointsJodie Wong
3,522 PointsI tried that before, didin't work, I've fixed the problem. Open Android studio -> config -> Compiler -> Java compiler, then choose the version 1.6.