Link to home
Start Free TrialLog in
Avatar of MartinHouse
MartinHouseFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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.
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

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.
Avatar of MartinHouse

ASKER

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
ASKER CERTIFIED SOLUTION
Avatar of Marco Gasi
Marco Gasi
Flag of Spain image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
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