没找到 class "android.support.v7.internal.widget.TintManager"

Didn't find class "android.support.v7.internal.widget.TintManager"

从昨天开始,我的应用程序就不是因为这个错误而运行了。我一直在努力寻找解决方案,但我还没有找到任何已经实现的东西。 我已经将我的 build.gradle 修改为添加两个新库,但不要认为这是失败的原因。

build.gradle:

compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:design:23.1.0' // http://android-developers.blogspot.com.es/2015/05/android-design-support-library.html
compile 'com.android.support:palette-v7:23.1.0'

错误日志:

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/internal/widget/TintManager;

Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.internal.widget.TintManager" on path: DexPathList

错误发生在我有 TabLayout 的所有片段中。

如果有任何想法请帮助我,在此先感谢。

最后,我通过删除引入的一个新库解决了这个问题,我认为这不是问题所在,但它起作用了

您要启用 Multi-Dex,添加新库。确实添加了更多 类 和方法,因此您可能 运行 超出了 65k 的限制。

'com.android.support:appcompat-v7:23.3.0'

'com.android.support:design:23.3.0'

您需要使 appcompatdesign 相同 Version.It 并不意味着您应该使它们相同使用 buildToolsVersion。我的 buildToolsVersion 是“23.0.3”。