Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.0 FF
-
None
-
-
2021wk24PO2
Description
Note: This ticket's content has been moved from QTBUG-84382, and it has been originally reported by aqadir.
Tring to call a function inside java file from main.cpp, which is extending org.qtproject.qt.android.bindings.QtActivity. My java file is under android/src/<package-name> folder.
In version 5.1, used to call like below:
QAndroidJniObject jClass = QAndroidJniObject("poc/dialogue/Hello", "(Landroid/app/Activity;)V",
QtAndroid::androidActivity().object<jobject>());
jClass.callMethod<void>("showDialogue");
In preview version 6.2, trying to call like below:
QJniObject jClass = QJniObject("poc/dialogue/Hello", "(Landroid/app/Activity;)V", QtAndroidPrivate::activity());
jClass.callMethod<void>("showDialogue");
It throws the below error in 6.2 but was working fine in 5.1. Can you please guide the correct way?
W System.err: java.lang.ClassNotFoundException: Didn't find class "poc.dialogue.Hello" on path: DexPathList[[],nativeLibraryDirectories=[/system/lib64, /product/lib64]]
Attachments
Issue Links
- relates to
-
QTBUG-84382 QtAndroidExtras in Qt 6
- Closed
- mentioned in
-
Page Loading...
For Gerrit Dashboard: QTBUG-94597 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
355749,3 | Fix CMake templates information for Android | master | qt-creator/qt-creator | Status: MERGED | +2 | 0 |