Closed Pahanuch closed 7 years ago
In any case post your module build.gradle
file.
Specifying the aar
artifact explicitly will prevent pulling in transitive dependencies. Then you'll need to manually add the denpendencies.
ext.supportLibVersion = "24.1.1"
compile "com.android.support:preference-v7:$supportLibVersion"
compile 'net.xpece.android:support-preference:1.0.3@aar'
compile 'net.xpece.android:support-spinner:1.0.2@aar'
If that didn't fix it, you may have gone over 65K method limit. Google multidex
.
Thanks, but now I get errors when build project!
compile 'net.xpece.android:support-spinner:1.0.2@aar'
compile ok. Problem with compile 'net.xpece.android:support-preference:1.0.3@aar'
I can provide more info once you do what I asked.
My module build.gradle
file
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "proviser.legalapps.com.proviser"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
/* dexOptions {
incremental true
javaMaxHeapSize "2048M"
}*/
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/jxl.jar')
compile files('libs/android-viewbadger.jar')
compile files('libs/httpclient-4.0.jar')
compile files('libs/httpcore-4.0.1.jar')
compile files('libs/jsoup-1.8.3.jar')
compile 'com.android.support:appcompat-v7:24.1.1'
compile 'com.android.support:design:24.1.1'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.prolificinteractive:material-calendarview:1.4.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'cn.pedant.sweetalert:library:1.3'
compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
compile 'com.afollestad.material-dialogs:commons:0.9.0.1'
compile 'com.afollestad.material-dialogs:core:0.9.0.1'
compile 'com.github.flavienlaurent.datetimepicker:library:0.0.2'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'dev.dworks.libs:astickyheader:0.1.0'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'net.xpece.android:support-preference:1.0.3@aar'
}
Thank you, I updated my original comment, which should now fix the issue.
Another solution would be to update to support libs 24.2.+.
Thanks, it resolved a problem. But this solution works only if I add to this support-spinner
ext.supportLibVersion = "24.1.1"
compile "com.android.support:preference-v7:$supportLibVersion"
compile 'net.xpece.android:support-preference:1.0.3@aar'
compile 'net.xpece.android:support-spinner:1.0.2@aar'
This I get when I don't add compile 'net.xpece.android:support-spinner:1.0.2@aar'
Ah, you're right, good catch. I will try and make this* easier in future releases.
*using the library with older support libs
I just added library to project and app crash when starting. After I deleted dependence - the app works again!