Android Studio - Gradle project sync failed

HI,

I'm an Android newbie and have downloaded Android Studio v1.4.1 and Android SDKs to try out a simple Hello world app ( using some initial guidance from a Lynda.com training session.

I've added no code, and have created a AVD and ran the app OK ( which simply shows a Hello Word message ).  That was yesterday.

Today I've opened up Android Studio and tried to repeat the process but I get the message "Gradle project Sync failed.  Please fix your project and try again".  I assume that there is something outside of Android Studio that has interfered, but what ?

Any guidance on where I should look to fin out what the problem is would be a start, but an explanation of what I could be doing wrong would be best :-)

Thanks Mart

PS I'm using Windows 7 Prof.
LVL 1
MartinHouseAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Marco GasiFreelancerCommented:
Open Android SDK and check under Extras folder if Android Support Repository is installed: if it is not, then install it. Once installed, Gradle synch should start and complete successfully. look at the bottom panel because it could require to install some other module.
MartinHouseAuthor Commented:
Thanks for your message Marco.  I can see that's SDK Manager / Andrord SDK / SDK Tools / Android Support Repository rev 24 is installed.

I have this error message -
Failed to sync Gradle project 'Hello Word'
Error:Error:Unable to start the daemon process: could not reserve enough space for object heap.
Please assign more memory to Gradle in the project's gradle.properties file.
For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB:

...followed by two links to info in Gradle which is beyond me at the moment.

Any further suggestions would be most welcome !

Mart
Marco GasiFreelancerCommented:
Try to add this line

org.gradle.jvmargs=-Xmx512m -XX\:MaxPermSize\=512m

Open in new window


to your application gradle.properties

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
MartinHouseAuthor Commented:
Thanks Marco !

I added the line you supplied to the 'gradle.properties'  'file' - was that the correct place to put it ?

I can see that the line you gave suggests some memory sizes, but why should they be needed when I've just downloaded a fresh version of Android Studio ? Any ideas ?

Thanks a lot anyway,

Cheers

Mart
Marco GasiFreelancerCommented:
Sorry, I don't know why, but when I installed Android Studio I had to make some manual adjustment too :-)
Glad that solved your problem.
Cheers
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Android

From novice to tech pro — start learning today.