Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
6.5.1
-
None
-
-
2f706df65 (dev)
-
2023wk44FOQtforAndroid, 2023wk46FOQtforAndroid
Description
We get this linter issues in our app.
/.../src/android/java/src/org/qtproject/qt/android/bindings/QtActivityLoader.java:79: Warning: Accessing internal APIs via reflection is not supported and may not work on all devices or in the future [PrivateApi] m_activity.setTheme(Class.forName("android.R$style").getDeclaredField(QT_ANDROID_DEFAULT_THEME).getInt(null)); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Explanation for issues of type "PrivateApi": Using reflection to access hidden/private Android APIs is not safe; it will often not work on devices from other vendors, and it may suddenly stop working (if the API is removed) or crash spectacularly (if the API behavior changes, since there are no guarantees for compatibility). https://developer.android.com/preview/restrictions-non-sdk-interfaces
Maybe line 65 is affected, too.
Attachments
Issue Links
- is covered by
-
QTBUG-114593 Simpler Qt for Android Java bindings
-
- Closed
-