Unsolved Qt 5.11.2 is using "Non-SDK" interfaces, will be blocked by Android?
-
In Android 9 on Qt 5.11.2 and using API 28 (tried others as well), at startup, I'm seeing output like this on simplistic Qt apps:
Accessing hidden method Landroid/graphics/drawable/BitmapDrawable;->getTintMode()Landroid/graphics/PorterDuff$Mode; (light greylist, reflection)
and
java.lang.NoSuchFieldException: No field mPivotX in class Landroid/graphics/drawable/RotateDrawable$RotateState;
When you look into this you discover that Android is going start disabling applications that use private "non-SDK" interfaces: https://developer.android.com/about/versions/pie/restrictions-non-sdk-interfaces
I looked around on the forum and I'm not seeing anything about this yet it looks pretty serious. What am I missing? Did I configure something incorrectly?
-
Please report this on Qt bugtracker. Sounds serious indeed.
-
I just filed a bug, thank you.
-
Post a link here, then, please :-) I want to keep an eye on it.
-
@sierdzio It's QTBUG-71590
-
Thank you
-
The state of the things seems to be:
"Greylisted non-SDK interfaces encompass methods and fields which continue to function in Android 9, but to which we don't guarantee access in future versions of the platform." (Google)
"Note that the warnings are suppressed in Qt 5.12 (the default target version is 28 and if a lower target version is set, then style extraction is disabled). The APIs in use are in the "light-grey" category, meaning that their access is permitted as long as you set the target version to 28." (Qt Company)
" Is there an indication that they will be blacklisted at a later stage?
If that is the plan, then we should try to make a feature request to Google. If they reject the request, then parts of or all of the style extraction code will stop working." (Qt Company)