error in compiling a project for android
-
wrote on 4 Feb 2023, 14:21 last edited by
hello every one.
i write an app with qml and successfully compile with mingw in windows but when i want build it for android it give me some error.:/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:1077: moc_person.cpp] Error 1 make: *** Waiting for unfinished jobs.... :/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:1006: moc_period.cpp] Error 1 :/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:913: moc_myTranslator.cpp] Error 1 :/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:799: moc_controller.cpp] Error 1 17:29:13: The process "D:\android\SDK4\ndk\23.1.7779620\prebuilt\windows-x86_64\bin\make.exe" exited with code 2. Error while building/deploying project DarVish (kit: Android Qt 6.2.4 Clang x86_64) When executing step "Make" 17:29:13: Elapsed time: 00:08.
i useing qt 6.2.4 and android 12
any idea how to solve this error? -
hello every one.
i write an app with qml and successfully compile with mingw in windows but when i want build it for android it give me some error.:/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:1077: moc_person.cpp] Error 1 make: *** Waiting for unfinished jobs.... :/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:1006: moc_period.cpp] Error 1 :/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:913: moc_myTranslator.cpp] Error 1 :/Qt6.2/6.2.4/android_x86_64/include/QtCore/qnamespace.:56:1: error: Parse error at "__attribute__" make: *** [Makefile:799: moc_controller.cpp] Error 1 17:29:13: The process "D:\android\SDK4\ndk\23.1.7779620\prebuilt\windows-x86_64\bin\make.exe" exited with code 2. Error while building/deploying project DarVish (kit: Android Qt 6.2.4 Clang x86_64) When executing step "Make" 17:29:13: Elapsed time: 00:08.
i useing qt 6.2.4 and android 12
any idea how to solve this error?wrote on 5 Feb 2023, 15:52 last edited byWhen it comes to compiling for Android, the most critical tool is the Android NDK and its correct version for the Qt version used.
-
wrote on 5 Feb 2023, 16:09 last edited by
I think NDK version is match because I successfully build galley app in an emulator and my phone.
-
I think NDK version is match because I successfully build galley app in an emulator and my phone.
wrote on 6 Feb 2023, 17:03 last edited byI figure out this is because of Q_Object macro I added in those files.
I don't know why the macro doesn't work maybe better open another post.
in other posts people suggest to rerun the qmke to solve this problem but doesn't work for me
anyone know why Q_Object macro doesn't work for android?
4/4