android - 为什么 DependencyResolveDetails 以红色突出显示

标签 android

DependencyResolveDetails 在我的应用程序 gradle 文件中以红色突出显示。 我的android studio是3.3的,怎么解决这个警告。

    configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '28.0.0'
            }
        }

    }
}

警告信息是:

Cannot resolve symbol 'DependencyResolveDetails' 

最佳答案

只需删除“DependencyResolveDetails”:

configurations.all { //fix ClassNotFoundException : OnUnhandledKeyEventListener
    resolutionStrategy.eachDependency { details ->
        def requested = details.requested
        if (requested.group == "com.android.support") {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion "26.+"
            }
        }
    }
}

关于android - 为什么 DependencyResolveDetails 以红色突出显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54665874/

相关文章:

android - 如何在应用程序启动时创建所有 fragment

android - 自定义 ListView 上的 Material 设计 Activity 动画 onClick 事件

android - 计费库 2.0 中的新 "Resubscribe"功能是什么?它与旧的计费库 1.2.2 有何不同?

java - 谷歌地图应用程序中未显示地理 Intent 标签

Android单笔和多笔手势在同一个库中混淆了GesturesOverlayView?

android - SurfaceView 游戏线程 (android) 上的 drawBitmap 性能低下

android - 如何覆盖android边缘屏幕[Expokit]

Android 应用内商品

android - -Android 主页按钮崩溃应用程序

android - 你如何修补更新 Android Studio (0.80 -> 0.81)?