A week ago I started implement Chat System to my app using Smack API (4.1.8 version). And It works well on Lolipop device and Marshmallow too. But on Kitkat( API 19) I get exception NoClassDefFoundError
LogCat:
Process: mobi, PID: 23510
java.lang.NoClassDefFoundError: org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration
at mobi.networking.ChatXMPPConnection.connect(ChatXMPPConnection.java:76)
at mobi.networking.ChatXMPPService.initConnection(ChatXMPPService.java:80)
at mobi.networking.ChatXMPPService.access$100(ChatXMPPService.java:36)
at mobi.networking.ChatXMPPService$1.run(ChatXMPPService.java:112)
at java.lang.Thread.run(Thread.java:841)
So what is it on the line 76(the first line):
XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();
configBuilder.setUsernameAndPassword(mUsername, mPassword);
configBuilder.setSecurityMode(ConnectionConfiguration.SecurityMode.disabled);
configBuilder.setResource("Android");
configBuilder.setServiceName(DOMAIN);
configBuilder.setHost(HOST);
configBuilder.setPort(PORT);
My build-gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 24
buildToolsVersion "24.0.3"
dataBinding
{
enabled = true
}
defaultConfig {
applicationId "mobi"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots" }
mavenCentral()
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.1'
compile 'com.android.support:design:24.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.support:recyclerview-v7:24.0.1'
compile 'com.zaihuishou:expandablerecycleradapter-databinding:1.0.0'
compile 'com.bignerdranch.android:expandablerecyclerview:3.0.0-SNAPSHOT'
compile 'com.kyleduo.switchbutton:library:1.4.1'
compile 'info.hoang8f:android-segmented:1.0.6'
compile 'com.github.Kennyc1012:BottomSheet:2.3.1'
compile 'com.aurelhubert:ahbottomnavigation:1.3.3'
compile 'com.vk:androidsdk:1.6.5'
compile 'com.brucetoo.pickview:library:1.2.2'
compile 'gun0912.ted:tedpermission:1.0.0'
compile 'com.squareup.okio:okio:1.11.0'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.basgeekball:awesome-validation:1.3'
compile 'com.google.code.gson:gson:2.4'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.github.aakira:expandable-layout:1.6.0#aar'
compile 'fr.xebia.android.freezer:freezer:2.0.3'
provided 'fr.xebia.android.freezer:freezer-annotations:2.0.3'
apt 'fr.xebia.android.freezer:freezer-compiler:2.0.3'
compile "me.henrytao:smooth-app-bar-layout:24.2.1.0"
compile ("org.igniterealtime.smack:smack-android-extensions:4.1.8") {
exclude group: 'xpp3', module: 'xpp3'
}
compile ("org.igniterealtime.smack:smack-tcp:4.1.8"){
exclude group: 'xpp3', module: 'xpp3'
}
compile ("org.igniterealtime.smack:smack-experimental:4.1.8"){
exclude group: 'xpp3', module: 'xpp3'
}
}
}
also, my libs folder is empty. I don't use jar-files
Link to Smack-Wiki https://github.com/igniterealtime/Smack/wiki/Smack-4.1-Readme-and-Upgrade-Guide#using-eclipses-android-development-tools-adt-ant-based-build
Please, help, I loose two days on fixing it
I was also facing the same issue.
Try adding the following dependency:
compile 'com.android.support:multidex:1.0.1'
and in your application class add this,
#Override
protected void attachBaseContext(Context base)
{
super.attachBaseContext(base);
MultiDex.install(BaseApplication.this);
}
Related
After updating the Firebase SDK to 11.8.0, I am getting that error.Please help me in resolving this.
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'android-apt'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
}
dependencies {
compile('com.github.ozodrukh:CircularReveal:1.3.1#aar') {
transitive = true;
}
}
android {
signingConfigs {
config {
keyAlias 'crm'
keyPassword 'autobiz'
storeFile file('D:/LatestProjects/LatestProjects/WyzProjects/WyzProjects/WYZCRM/wyzcrmKeystore/Keystore/WYZCRM.jks')
storePassword 'autobiz'
}
}
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.wyzcrm9013.wyzcrmapp"
minSdkVersion 16
targetSdkVersion 25
versionCode 2
versionName "1.5"
}
buildTypes {
debug {
debuggable = true as BuildType
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable false
signingConfig signingConfigs.config
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/maven/commons-io/commons-io/pom.xml'
exclude 'META-INF/maven/commons-io/commons-io/pom.properties'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.5.5#aar') {
transitive = true;
}
compile('com.digits.sdk.android:digits:1.9.4#aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.afollestad.material-dialogs:core:0.9.0.1'
compile 'org.apache.commons:commons-io:1.3.2'
compile 'com.github.mahmed8003:DroidValidatorLight:1.0.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.google.android.gms:play-services-gcm:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
compile 'com.github.ybq:Android-SpinKit:1.1.0'
compile 'com.jakewharton:butterknife:8.1.0'
apt 'com.jakewharton:butterknife-compiler:8.1.0'
compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.firebase:digitsmigrationhelpers:0.1.1'
compile 'com.firebaseui:firebase-ui-auth:2.0.0'
compile 'com.firebaseui:firebase-ui:0.4.4'
compile 'com.hbb20:ccp:1.7.2'
//compile 'com.google.android.gms:play-services-appindexing:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
Let me know any changes need to be made. Prior to this I used 11.4.2 version, and it worked fine in all the devices.
The device which has Google play services with the version 11.9.52, this Am not getting FCM token.
Change this:
compile 'com.firebaseui:firebase-ui-auth:2.0.0'
compile 'com.firebaseui:firebase-ui:0.4.4'
to this:
compile 'com.firebaseui:firebase-ui-auth:3.2.1'
compile 'com.firebaseui:firebase-ui:3.2.1'
FirebaseUI Compatibility with Firebase/google play services
Getting this error on run time for the application but compilation is succesfully.
ERROR
Error:Failed to capture snapshot of input files for task 'compileDebugJavaWithJavac' property 'classpath' during up-to-date check.> Failed to create MD5 hash for file 'F:\Projects\Table42\trunk\app\libs\appsee.jar'.
my gradle ::
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId 'com.imate.android'
minSdkVersion 19
targetSdkVersion 19
versionCode 15
versionName "1.14"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
buildTypes {
release {
debuggable false
buildConfigField "boolean", "DEBUG_MODE", "false"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
buildConfigField "boolean", "DEBUG_MODE", "true"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-annotations:23.1.1'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.20.1'
}
}
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/org.apache.http.legacy.jar')
compile files('libs/appsee.jar')
compile files('libs/AF-Android-SDK-v2.3.1.18.jar')
compile('com.github.nkzawa:socket.io-client:0.3.0') {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.mcxiaoke.volley:library:1.0.15'
compile 'com.android.support:support-v13:23.2.0'
compile 'com.edmodo:rangebar:1.0.0'
compile 'com.android.support:support-v4:23.2.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:design:26.0.0'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.google.guava:guava-collections:r03'
compile 'com.lorentzos.swipecards:library:1.0.9'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.+'
compile 'com.jakewharton:butterknife:8.2.1'
compile 'com.skyfishjy.ripplebackground:library:1.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-database:1.1.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile 'com.github.bumptech.glide:glide:3.4.+'
compile('com.twitter.sdk.android:twitter:2.3.2#aar') {
transitive = true;
}
compile('io.nlopez.smartlocation:library:3.3.1') {
transitive = false
}
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.stripe:stripe-android:4.0.1'
compile "com.github.miguelbcr:RxPaparazzo:0.5.2-2.x"
compile 'com.afollestad.material-dialogs:core:0.9.4.4'
compile 'org.honorato.multistatetogglebutton:multistatetogglebutton:0.2.2'
testCompile 'junit:junit:4.12'
compile "com.android.support:appcompat-v7:$rootProject.supportLibraryVersion"
compile "com.android.support:design:$rootProject.supportLibraryVersion"
androidTestCompile "com.android.support:support-annotations:$rootProject.ext.supportAnnotationsversion"
// Android Testing Support Library's runner and rules
androidTestCompile "com.android.support.test:runner:$rootProject.ext.runnerVersion"
androidTestCompile "com.android.support.test:rules:$rootProject.ext.rulesVersion"
// Espresso UI Testing dependencies.
androidTestCompile "com.android.support.test.espresso:espresso-core:$rootProject.ext.espressoVersion"
compile 'com.google.firebase:firebase-messaging:9.0.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
//geofire
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.zxing:core:3.2.1'
compile 'com.braintreepayments.api:drop-in:3.+'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.ratty3697:android-smart-animation-library:1.6'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
compile project(path: ':firebase')
}
apply plugin: 'com.google.gms.google-services'**
I'm trying to compile with this gradle to add aviary sdk to my project
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'realm-android'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 25
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "..."
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
signingConfigs {
release {
...
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
packagingOptions {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
}
}
repositories {
maven { url 'https://dl.bintray.com/brendanw/maven/' }
maven { url 'https://clojars.org/repo/' }
maven { url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo' }
maven { url 'https://maven.fabric.io/public' }
maven {
name 'maven.aviary.com'
url uri("http://maven.aviary.com/repo/release")
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// Compatibility
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:multidex:1.0.1'
// Play services API
compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-location:9.6.1'
compile 'com.google.android.gms:play-services-places:9.6.1'
// Map Utils
compile 'com.google.maps.android:android-maps-utils:0.4.3'
// Realm.io
compile 'io.realm:android-adapters:1.3.0'
// Stetho
compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.uphyca:stetho_realm:0.9.0'
// Firebase
compile 'com.google.firebase:firebase-messaging:9.6.1'
// Parceler
compile 'org.parceler:parceler-api:1.1.1'
apt 'org.parceler:parceler:1.1.1'
// Events
compile 'org.greenrobot:eventbus:3.0.0'
// Network
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.squareup.retrofit2:retrofit:2.0.1'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
compile 'org.apache.commons:commons-lang3:3.4'
// Data Verification
compile 'com.googlecode.libphonenumber:libphonenumber:5.5'
// Image Loading
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
// Annotations
compile 'com.jakewharton:butterknife:7.0.1'
compile 'javax.validation:validation-api:1.0.0.GA'
compile 'javax.annotation:jsr250-api:1.0'
// Views
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile 'io.card:android-sdk:5.3.4'
// Logging
compile 'com.jakewharton.timber:timber:4.1.1'
compile 'com.jaredrummler:android-device-names:1.0.9'
// Barcode
compile 'com.google.zxing:core:3.2.1'
// Facebook
compile 'com.facebook.android:facebook-android-sdk:4.15.0'
// Payment
compile 'me.brendanweinstein:paymentkit-droid:1.0.4'
compile 'com.stripe:stripe-android:1.0.4'
//fabric
compile('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') {
transitive = true;
}
//adobe
compile 'com.aviary.android.feather.sdk:aviary-sdk:3.6.3'
}
apply plugin: 'com.google.gms.google-services'
and i have some errors on values compiled file..
C:\Users\OLENGO\Desktop\Remy\android-printogo\app\build\intermediates\res\merged\debug\values\values.xml
Error:(1562) Error retrieving parent for item: No resource found that matches the given name '#style/Theme.Base.AppCompat.Dialog.FixedSize'.
I already try with this sample : https://github.com/CreativeSDK/android-getting-started-samples/blob/master/image-editor-ui/guide/image-editor.markdown
but if i upgrade the compileSdkVersion, even the sample have some errors
Does anyone else had such problem, and is there any way to avoid this crash?
i read more solutions about this problem but my problem couldn't resolve. its happened after add more library such Dagger and Realm on my project
Full stack error:
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/internal/widget/TintManager;
at android.support.design.widget.TabLayout$TabView.<init>(TabLayout.java:1179)
at android.support.design.widget.TabLayout.createTabView(TabLayout.java:655)
at android.support.design.widget.TabLayout.addTabView(TabLayout.java:690)
at android.support.design.widget.TabLayout.addTab(TabLayout.java:385)
at android.support.design.widget.TabLayout.addTab(TabLayout.java:360)
at android.support.design.widget.TabLayout.setTabsFromPagerAdapter(TabLayout.java:644)
at android.support.design.widget.TabLayout.setupWithViewPager(TabLayout.java:615)
UPDATED:
My gradle file content :
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'realm-android'
android {
compileSdkVersion 24
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "com.pishguy.androidapplication.xxx"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
}
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
project.ext {
supportVersion = '24.2.1'
daggerVersion = '2.0.1'
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile("com.android.support:support-v4:$supportVersion") {
force = true;
}
compile "com.android.support:appcompat-v7:$supportVersion"
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.4.0'
compile 'com.jakewharton.rxbinding:rxbinding-design:0.4.0'
compile 'com.jakewharton:butterknife:8.2.1'
apt 'com.jakewharton:butterknife-compiler:8.2.1'
compile('io.socket:socket.io-client:0.7.0') {
exclude group: "org.json", module: "json"
}
compile('com.github.ozodrukh:CircularReveal:2.0.1#aar') {
transitive = true;
}
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.balysv:material-ripple:1.0.2'
compile 'com.bugsnag:bugsnag-android:+'
compile 'com.facebook.rebound:rebound:0.3.8'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.jaredrummler:android-device-names:1.0.9'
compile 'org.sufficientlysecure:html-textview:1.6'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'com.kogitune:pre-lollipop-activity-transition:1.3.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.alexvasilkov:foldable-layout:1.2.0'
compile 'cat.ereza:customactivityoncrash:1.5.0'
compile 'com.github.hotchemi:permissionsdispatcher:2.1.3'
apt 'com.github.hotchemi:permissionsdispatcher-processor:2.1.3'
compile 'com.github.goka.flickableview:flickableview:1.0.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.github.justzak:dilatingdotsprogressbar:1.0.1'
compile('de.keyboardsurfer.android.widget:crouton:1.8.5#aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.h6ah4i.android.materialshadowninepatch:materialshadowninepatch:0.6.5'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.4.0'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.tumblr:backboard:0.1.0'
compile "com.google.dagger:dagger:${daggerVersion}"
apt "com.google.dagger:dagger-compiler:${daggerVersion}"
provided 'javax.annotation:javax.annotation-api:1.2'
compile project(':lib-searchview')
}
how can i resolve this problem?
Replace
compile("com.android.support:support-v4:${supportPackageVersion}") {
force = true;
}
compile "com.android.support:appcompat-v7:${supportPackageVersion}"
with
compile 'com.android.support:appcompat-v7:23.1.1'
May be it will help you.
Support library versions from RxBinding:
supportVersion = '24.2.1'
supportAnnotations = "com.android.support:support-annotations:$supportVersion"
supportV4CoreUi = "com.android.support:support-core-ui:$supportVersion"
supportRecyclerView = "com.android.support:recyclerview-v7:$supportVersion"
supportAppCompat = "com.android.support:appcompat-v7:$supportVersion"
supportDesign = "com.android.support:design:$supportVersion"
supportLeanback = "com.android.support:leanback-v17:$supportVersion"
Your current build.gradle support version:
project.ext {
supportPackageVersion = '24.0.0'
You should update to 24.2.1.
I have multidex enabled and i am using org.apache.http.legacy.jar and added jumblr gradle path in my gradle file.I am getting exception
Error:Execution failed for task :app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: org/apache/commons/codec/binary/Base64.class
I think this is because jumblr is also using the http legacy library so i think i need to explicitly remove http legacy library from jumblr gradle path. Kindly let me know on how to remove specific file/jar/class from a gradle path.
Update
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
maven {
url "https://s3.amazonaws.com/repo.commonsware.com"
}
}
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion 23
buildToolsVersion "23.0.0"
dexOptions {
incremental true
javaMaxHeapSize "4g"
}
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
debug {
shrinkResources true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
// configurations {
// all*.exclude group: 'org.apache', module: 'commons'
// }
}
dependencies {
// Enabling multidex support.
compile 'com.android.support:multidex:1.0.1'
//Other Libraries
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/okhttp-2.2.0.jar')
compile files('libs/okhttp-urlconnection-2.2.0.jar')
compile files('libs/okio-1.2.0.jar')
compile files('libs/volley.jar')
compile files ('org.apache.http.legacy.jar')
compile files('libs/universal-image-loader-1.9.0.jar')
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.jpardogo.materialtabstrip:library:1.1.0'
compile 'com.pkmmte.view:circularimageview:1.1'
// compile 'com.github.satyan:sugar:1.3'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.googlecode.mp4parser:isoparser:1.0.5.4'
compile 'org.bytedeco:javacv:1.0'
compile 'org.bytedeco.javacpp-presets:opencv:2.4.11-0.11:android-x86'
compile 'org.bytedeco.javacpp-presets:ffmpeg:2.6.1-0.11:android-x86'
compile 'org.bytedeco.javacpp-presets:opencv:2.4.11-0.11:android-arm'
compile 'org.bytedeco.javacpp-presets:ffmpeg:2.6.1-0.11:android-arm'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
compile project(':vidEffect')
// For Endless adapter
compile 'com.commonsware.cwac:adapter:1.0.+'
compile 'com.commonsware.cwac:endless:1.2.3'
// For Facebook
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
// For Twitter
compile('com.twitter.sdk.android:twitter:1.8.0#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics:2.5.2#aar') {
transitive = true;
}
// For Tumblr
compile files('libs/signpost-commonshttp4-1.2.jar')
compile files('libs/signpost-core-1.2.jar')
compile 'com.google.guava:guava:18.0'
compile project(':ViewPagerIndicator')
compile ('com.tumblr:jumblr:0.0.11'){
transitive = true;
exclude module: 'Base64';
}
//Incase we have no choice but to use source code
// compile project(':jumblr')
}
I think you can use exclude
compile('jumblr.jar') {
transitive = true;
exclude module: 'Base64';
}
OR
compile ('com.tumblr:jumblr:0.0.11') {
transitive = true;
exclude module: 'Base64';
}