在Android 4.1之前,方法android.graphics.PorterDuffColorFilter ---会错误地覆盖包 [英] Before Android 4.1, method android.graphics.PorterDuffColorFilter --- would have incorrectly overridden the package
问题描述
我正在使用导航抽屉活动android studio
和 Firebase身份验证
。当我要运行这个应用程序时,我得到这个错误。
I am using navigation drawer activity android studio
and Firebase Authentication
. When i going to run this app than i get this error.
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
我还使用最少版本的SDK和构建工具......
I am also using least version SDK and build tool...
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
}
推荐答案
Android曾经在 Dalvik VM上运行
。
Android used to run on Dalvik VM
.
Dalvik
有一个错误,允许类覆盖父包的私有方法。
Dalvik
had a bug allowing classes to override parent's package-private methods.
所以当他们切换到 ART
时,他们修复了这个,所以它不再覆盖父方法,
现在当检测到这样的场景,它会记录一个警告,确保你知道行为的变化。
So when they switched to ART
, they fixed this, so it no longer overrides the parent's method,
Now when such a scenario is detected, it logs a warning, making sure you're aware of the behavior change.
似乎有些 support-lib
classes( PorterDuffColorFilter
, VectorDrawableCompat
)有这样的场景,所以 ART
通知你。
It seems that some support-lib
classes (PorterDuffColorFilter
, VectorDrawableCompat
) have such scenario, so ART
notifies you.
我认为忽略这一点是安全的,除非这是你自己的代码,在这种情况下我会改变方法的在Android上运行 Dalvik
(4.1之前)并运行 ART
(4.1 +)
I think it's safe to ignore this, unless this is your own code, in which case I would either change the method's name, or test on Android running Dalvik
(pre-4.1) and running ART
(4.1+)
这篇关于在Android 4.1之前,方法android.graphics.PorterDuffColorFilter ---会错误地覆盖包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!