androidTestImplementation 'com.android.support.test:runner:1.0.2'
突出显示一条非常典型的错误消息,没什么特别的:
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1) .....
但是当我在它周围添加 ( )
时,该警告就消失了......
androidTestImplementation ('com.android.support.test:runner:1.0.2')
- Android Studio 3.3
com.android.tools.build:gradle:3.3.0
我只是注意到了这一点,从未注意到这一点
发生在以前的版本上。我认为 ( )
不会产生影响,或者这是一个 lint bug?
重现:只需创建任何新项目并添加另一个触发该警告的依赖项,例如 com.google.android.gms:play-services-instantapps
,然后继续插入/切换( )
亲自看看。
最佳答案
based on what it says here似乎添加 ()
是为了提供使用该特定版本的理由,并且可以像这样使用:
implementation('org.ow2.asm:asm:6.0') {
because 'we require a JDK 9 compatible bytecode generator'
}
因此警告可能会消失,因为它认为您有充分的理由使用该版本
关于android - 添加 "(" ")"如何更改 gradle 警告消息?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54485122/