Android获得失败的解决方案:Landroid / support / v7 / internal / widget / TintManager

时间:2016-10-20 09:32:10

标签: android realm dagger-2 rx-android

我阅读了有关此问题的更多解决方案,但我的问题无法解决。它发生在我的项目

上添加更多库DaggerRealm之后

完整堆栈错误:

       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)

更新:

我的gradle文件内容:

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')
}

我该如何解决这个问题?

2 个答案:

答案 0 :(得分:0)

替换

compile("com.android.support:support-v4:${supportPackageVersion}") {
    force = true;
}
compile "com.android.support:appcompat-v7:${supportPackageVersion}"

compile 'com.android.support:appcompat-v7:23.1.1'

可能会帮助你。

答案 1 :(得分:0)

支持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"

您当前的build.gradle支持版本:

project.ext {
    supportPackageVersion = '24.0.0'

您应该更新为24.2.1