I’ve got what is a pretty simple gradle file in my application module, which was generated automatically by Android studio.
When I go to launch my app, I get:
E/AndroidRuntime( 1828): java.lang.NoClassDefFoundError: com.google.common.collect.Lists
Android studio is apparently reading the dependencies correctly, since Lists successfully imports there - it’s like it’s just not being included in the APK for some reason.
runtime is a superset of compile, by default, according to the docs, so I’m not really sure where to go from here. What’s the approach to debugging this?
The gradle file in question:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile group: 'com.google.guava', name: 'guava', version: '14.+'
compile group: 'com.squareup.dagger', name: 'dagger', version: '1.+'
compile files('libs/android-support-v4.jar')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 10
targetSdkVersion 17
}
}