Nougat(25.0.0)编译警告

时间:2017-04-26 11:24:14

标签: android performance android-studio

我在我的应用程序中使用UrbanAirship 8.0.2,我希望在25.0.0中更新应用程序编译,但它显示警告,因为urbanAirship使用了24.2.1 support-v4库和Google Play服务9.4.0。我也试过UrbanAirship最新版本8.3.1,但Google Play服务9.8.0(不兼容25.0.0)。由于一些新功能,我的应用程序要求是Google Play 10.2。当我添加Google Play 10.2并支持25.0.0时,build.gradle会显示警告“您的应用程序正在使用多个版本的支持v4 lib以及可能导致应用程序崩溃的不同Google Play版本”。请告诉我什么是解决问题的最佳方法?

1 个答案:

答案 0 :(得分:0)

定义较新的依赖项以避免不匹配:

// Support libs
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'

// Urban Airship pulls in GCM, so define the newer version
compile 'com.google.android.gms:play-services-gcm:10.2.1'

compile 'com.urbanairship.android:urbanairship-sdk:8.3.2'