DependencyResolveDetails在我的app gradle文件中以红色亮起。
我的android工作室是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'

最佳答案

只需删除“dependencyrolvedetails”:

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.+"
            }
        }
    }
}

08-05 10:57