Goddchen / mvn-repo

154 stars 45 forks source link

Error adding libraries to android studio #36

Closed Shahar2k5 closed 10 years ago

Shahar2k5 commented 10 years ago

Any lib i'm trying to add gets the same error (with her own path of course) I added the repo as should.

That's the error i get. A problem occurred configuring project ':timetable'.

Could not resolve all dependencies for configuration ':timetable:_debugCompile'. Could not find com.facebook.android:facebook:3.5.2. Required by: TimeTable3:timetable:unspecified

buildscript { repositories { maven { url 'https://github.com/Goddchen/mvn-repo/raw/master/' } mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.7.+' } }

dependencies { compile 'com.android.support:support-v4:+' compile 'com.google.android.gms:play-services:4.0.30' compile 'com.facebook.android:facebook:3.5.2' compile files('libs/ActiveAndroid.jar') }

Thanks.

Shachi.

Goddchen commented 10 years ago

You only add the repos to the buildscript block. So they are only available in the buildscript block and nowhere else.

Shahar2k5 commented 10 years ago

Thanks, But can you please explain where to put it and why? This gradle stuff is new to me.

Thanks a lot.

Goddchen commented 10 years ago

Check out this Gradle file from one of my open source projects here on GitHub. https://github.com/Goddchen/GuildWars2-API-Explorer/blob/master/GuildWars2APIExplorer/build.gradle