Search code examples
androideclipsemavencocos2d-x

Where to define "repositories" in eclipse project


I'm following a tutorial to integrate facebook sdk in my android project, I'm using eclipse currently , tutorial is asking me to define repositories { mavenCentral() } in build.gradle file , but I don't know in which file I've to add this in eclipse... ant.properties, project.properties or any other file?

enter image description here

I've read some related threads , but I could not find in which file I've to change.

Defining Repository in Maven

maven repository eclipse project


Solution

  • You are working in Eclipse and the tutorial asks you to add the Maven central to your Gradle configuration which you (properly) don't have in Eclipse. You basically have two options:

    1. Get a Gradle plugin for Eclipse (like this: http://marketplace.eclipse.org/content/gradle-integration-eclipse-44)
    2. Get Android Studio (http://developer.android.com/tools/studio/index.html), where Gradle is already an integrated part of the IDE.

    Both options means that you have to get your head around what Gradle does, and how it works, but it'll properly be worth the effort.