I think you may be going about this the wrong way. JNI is for getting to android or providing to Android. If you want to use a native library with Qt, then just use it.
-----Original message----- Sent: Monday, 23 November 2015 at 07:37:19 From: "Захаров Александр Владимирович" <zakharov...@neurosoft.ru> To: interest@qt-project.org Subject: [Interest] Native library for Android using Qt We are trying to develop a library using Qt components for use from a usual Java-based Android application. We have managed to write JNI code and call a function from the library. However, the library is using some GUI components (although it does not show anything on the screen) and at one point (specifically, when creating a QTextDocument object) it crashes with an exception in QFontLibrary code. We have found that the library seems to require a valid QApplication object (when using QCoreApplication instead, it does not work). The library has one class implementing a singleton pattern with a single static method to be called from JNI. Is it possible to create a QApplication object in the class constructor? We tried to do it, but got and error: This application failed to start because it could not find or load the Qt platform plugin "android". Where should we place the plugins for the library and how to load them? With best regards, Alexander _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest