Provided dependencies can only be jars
android, android-gradle-plugin, build.gradle
Solution
Your provided dependencies can only be jars, your custom Android Libraries in your project should be compile at build time.
Change this:
provided 'com.MyCompany:MyLibrary:1.0'
provided 'com.google.android.gms:play-services:+'
to
compile 'com.MyCompany:MyLibrary:1.0'
compile 'com.google.android.gms:play-services:+'
Problem
I have an android projct in Android Studio, was all previously working the last time I used it, however, I've upgraded Android Studio and now I am getting a weird problem. In the error output in Android Studio I have the following: ``` Warning: Project MyApp: provided dependencies can only be jars. com.google.android.gms:play-services.6.5.87 is an Android Library Warning: Project MyApp: provided dependencies can only be jars. com.MyCompany.MyLibrary:aar:1.0 is an Android Library. ``` Below is my build.gradle file. ``` apply plugin: 'android' android { compileSdkVersion 21 buildToolsVersion "20.0.0" packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } defaultConfig { //applicationId "com.MyCompany.MyApp" minSdkVersion 14 targetSdkVersion 21 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' debuggable false } } repositories { mavenLocal() } } dependencies { compile 'com.android.support:appcompat-v7:21.0.0' compile 'com.android.support:support-v4:21.0.0' compile 'com.MyCompany:CritiMon:1.0' compile 'com.MyCompany:Library:1.1' provided 'com.MyCompany:MyLibrary:1.0' compile 'com.MyCompany:NavigationDrawerManager:2.1' provided 'com.google.android.gms:play-services:+' compile files('libs/ksoap2-android-assembly-3.0.0-jar-with-dependencies.jar') } ```