Not Able to Use QAndroidJniObject,QAndroidJniEnvironment,QtAndroid in a Project
-
I am compiling and creating build for one project,
but i am not getting error
/Users/username/Downloads/runtimeMobile/../runtimeMobile/example/example.h:23: error: 'QAndroidJniObject' file not found
#include <QAndroidJniObject>
^~~~~~~~~~~~~~~~~~~ -
-
Hi @Surajkumar-Tanurkar
In addition to @Shrinidhi-UpadhyayaPrefer below code if
androidextras
is not added. so it will not create problem for other platforms.android { QT += androidextras }
All the best.
-
Hi @Surajkumar-Tanurkar
In addition to @Shrinidhi-UpadhyayaPrefer below code if
androidextras
is not added. so it will not create problem for other platforms.android { QT += androidextras }
All the best.
@Pradeep-P-N said in Not Able to Use QAndroidJniObject,QAndroidJniEnvironment,QtAndroid in a Project:
android {
QT += androidextras
}Hello, I have added this code to the .pro file but the issue persists.
My QT version is 5.15.2 , compiler is MSVC2019_64bit.
QT creator 4.14.0 (community)
The following error pops up:
c:\users\admin\downloads\code\build-project-desktop_qt_5_15_2_msvc2019_32bit-debug\debug....\project\mainwindow.h:15: error: C1083: Cannot open include file: 'QAndroidJniObject': No such file or directory
C:\Users\admin\Downloads\code\project\mainwindow.h:15: error: 'QAndroidJniObject' file not found
C:\Users\admin\Downloads\code\project\mainwindow.h:16: error: 'QAndroidJniEnvironment' file not found
C:\Users\admin\Downloads\code\project\mainwindow.h:17: error: 'QtAndroid' file not found -
@Pradeep-P-N said in Not Able to Use QAndroidJniObject,QAndroidJniEnvironment,QtAndroid in a Project:
android {
QT += androidextras
}Hello, I have added this code to the .pro file but the issue persists.
My QT version is 5.15.2 , compiler is MSVC2019_64bit.
QT creator 4.14.0 (community)
The following error pops up:
c:\users\admin\downloads\code\build-project-desktop_qt_5_15_2_msvc2019_32bit-debug\debug....\project\mainwindow.h:15: error: C1083: Cannot open include file: 'QAndroidJniObject': No such file or directory
C:\Users\admin\Downloads\code\project\mainwindow.h:15: error: 'QAndroidJniObject' file not found
C:\Users\admin\Downloads\code\project\mainwindow.h:16: error: 'QAndroidJniEnvironment' file not found
C:\Users\admin\Downloads\code\project\mainwindow.h:17: error: 'QtAndroid' file not found@Aayushi said in Not Able to Use QAndroidJniObject,QAndroidJniEnvironment,QtAndroid in a Project:
My QT version is 5.15.2 , compiler is MSVC2019_64bit.
QT creator 4.14.0 (community)This is not your Qt version but the IDE version (Qt Creator is an IDE!)
The following error pops up:
c:\users\admin\downloads\code\build-project-desktop_qt_5_15_2_msvc2019_32bit-debug\debug....\project\mainwindow.h:15: error: C1083: Cannot open include file:If you want to compile for Android, you have to install an Android Qt Kit with Qt Maintenance Tool
For example:
Then you have to setup your Qt Android environnement: https://doc.qt.io/qt-5/android-getting-started.html
-
@Aayushi said in Not Able to Use QAndroidJniObject,QAndroidJniEnvironment,QtAndroid in a Project:
My QT version is 5.15.2 , compiler is MSVC2019_64bit.
QT creator 4.14.0 (community)This is not your Qt version but the IDE version (Qt Creator is an IDE!)
The following error pops up:
c:\users\admin\downloads\code\build-project-desktop_qt_5_15_2_msvc2019_32bit-debug\debug....\project\mainwindow.h:15: error: C1083: Cannot open include file:If you want to compile for Android, you have to install an Android Qt Kit with Qt Maintenance Tool
For example:
Then you have to setup your Qt Android environnement: https://doc.qt.io/qt-5/android-getting-started.html
@KroMignon Hello, Thank you for the solution. However after installing the prerequisites, I am facing the following problem:
May I know where possibly I could go wrong? The following are my settings:
-
@KroMignon Hello, Thank you for the solution. However after installing the prerequisites, I am facing the following problem:
May I know where possibly I could go wrong? The following are my settings: