Java Android Studio-gradle警告:所有com.Android.support库必须使用完全相同的版本规范
我在下面得到了警告Java Android Studio-gradle警告:所有com.Android.support库必须使用完全相同的版本规范,java,android,android-studio,gradle,Java,Android,Android Studio,Gradle,我在下面得到了警告 implementation 'com.android.support:appcompat-v7:28.0.0' 警告: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 24.0.0. Examples include
implementation 'com.android.support:appcompat-v7:28.0.0'
警告:
All com.android.support libraries must use the exact same version specification
(mixing versions can lead to runtime crashes).
Found versions 28.0.0, 24.0.0.
Examples include com.android.support:animated-vector-drawable:28.0.0
and com.android.support:mediarouter-v7:24.0.0
Inspection info:There are some combinations of libraries, or tools and libraries,
that are incompatible, or can lead to bugs.
One such incompatibility is compiling with a version of
the Android support libraries that is not the latest version
(or in particular, a version lower than your targetSdkVersion).
Issue id: GradleCompatible
下面是我的build.gradle(应用程序)代码(Firebase库的新更新)
我试图补充一点
com.android.support:support-v4:28.0.0
com.android.support:animated-vector-drawable:28.0.0
com.android.support:mediarouter-v7:28.0.0
但警告仍然存在
我可以运行我的应用程序,但我仍想修复此警告。谢谢
implementation 'com.android.support:appcompat-v7:28.0.0-alpha3'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:28.1.0'
或尝试
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
我给你的建议是,试着为你的项目查看每个库的每个最新版本。有些库甚至彼此版本不相同。liba版本可能是2.0,libb版本可能是2.5,但两者都是最新版本(例如Firebase)。此依赖项库版本是Android Studio 3.0+迁移的一部分。如果您添加的一个库使用的是旧版本,则需要更新它。可能是@KaranMer Hi的副本,我已检查了Google的Maven存储库:,并将我的所有库更新为最新版本,但是警告仍然存在。对于可能导致此问题的第三方库,请尝试使用其最新版本。您也可以尝试通过排除这些库来排除支持包,并在定义依赖项后添加此警告<代码>{exclude group:'com.android.support'}您好,我已经尝试了您的代码,警告仍然存在,并且在实现'com.android.support:design:27.1.0'行中出现了一个新的警告您好,我尝试了更新的警告,但仍然存在相同的警告。您的buildtoolversion是什么?添加此buildToolsVersion'27.0.3'我的Android Gradle插件是3.3.0,我尝试了buildToolsVersion'28.0.3',仍然不起作用
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:exifinterface:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:customtabs:28.0.0'
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'