Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
860 views
in Technique[技术] by (71.8m points)

java - Before Android 4.1, method android.graphics.PorterDuffColorFilter --- would have incorrectly overridden the package

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

I am also using least version SDK and build tool...

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
}
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Android used to run on Dalvik VM.

Dalvik had a bug allowing classes to override parent's package-private methods.

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.

It seems that some support-lib classes (PorterDuffColorFilter, VectorDrawableCompat) have such scenario, so ART notifies you.

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+)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...