Android Studio Gradle does not download maven depedencies -
i quite new android development , trying write test code. have downloaded android studio 1.3 version , created testapp. trying add com.facebook.android:facebook-android-sdk:4.1.0 depedency somehow it's not getting downloaded.
here project level build.gradle file.
buildscript { repositories { jcenter() mavencentral() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' // note: not place application dependencies here; belong // in individual module build.gradle files }}
here module level build.gradle file.
apply plugin: 'com.android.application' android { compilesdkversion 22 buildtoolsversion "22.0.1" defaultconfig { applicationid "com.testapp" minsdkversion 19 targetsdkversion 22 versioncode 1 versionname "1.0" } buildtypes { release { minifyenabled false proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile filetree(dir: 'libs', include: ['*.jar']) compile 'com.facebook.android:facebook-android-sdk:4.1.0' compile 'com.android.support:appcompat-v7:22.2.1' }
after reading other posts on similar topics confirmed gradle > global gradle settings > offline work not checked. still somehow facebook depedency not getting downloaded. suggestions issue? appreciate pointers.
thanks.
in yuor build.gradle
have add
repositories { jcenter() }
it way gradle knows dependencies download.
somenthing different repositories inside buildscript
block.
otherwise can add in top-level build.gradle
file:
allprojects { repositories { jcenter() } }
in case repository block valid modules in project.
Comments
Post a Comment