I have a custom view library that compiles and runs correctly on it's own (through another activity created just for testing purposes inside the library project). However when I build the library, and then import the aar into another project (open module settings->new module->existing aar..) I'm getting a runtime ClassNotFoundException - the exception is on the only gradle dependency that the library is using. Why is this happening?
Library gradle file:
apply plugin: 'com.android.library'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile 'com.googlecode.libphonenumber:libphonenumber:7.2.1'
}
The error that I'm getting:
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.i18n.phonenumbers.PhoneNumberUtil" on path: DexPathList[[zip file..