I am still using Android Studio 0.8.9 on my Macbook Air. On my iMac i installed Android Studio 1.0.
As 1.0 only supports 'com.android.tools.build:gradle:1.0.0' i had to change my build.gradles as mentioned here. Gradle DSL method not found: 'runProguard'
0.8.9 uses 'com.android.tools.build:gradle:0.12.2'
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example...."
minSdkVersion 19
targetSdkVersion 20
versionCode 1
versionName "0.87"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
dexOptions {
preDexLibraries = false
} }
repositories {
mavenCentral()
flatDir {
dirs 'libs'
} }
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.android.support:support-v4:20.0.+'
compile 'com.google.android.gms:play-services-wearable:+'
compile 'com.spotify.sdk:spotifysdk:1.0.0-beta6@aar'
compile('se.michaelthelin.spotify:spotify-web-api-java:1.4.20')
}
With the 0.8.9 beta on my MacBook Air my App builds fine. On my iMac i get this error.
org.apache.commons.collections.ArrayStack has already been added to output. Please remove duplicate copies.
UPDATE The problems seems to be that commons-collections is added to the external libraries and commons-beanutils which also includes a commons-collections.
compile('se.michaelthelin.spotify:spotify-web-api-java:1.4.20') { exclude group: "commons-beanutils", module: "commons-beanutils" }
if i exclude the commons-beanutils the build process is fine, but the app crashes, as it needs the commons-beanutils. same if i exclude the commons-collections.
furthermore i tried to manually remove the folder common-collections from the commons-beanutils jar, but this also does not work..