ons. 14. okt. 2020 kl. 21:03 skrev Raphael Cotty <raphael.co...@gmail.com>:
> Hi, > Just tried the Qt Quick wizard. If you change the CppApplication into > QtGuiApplication then it works (instead of QtApplication). > > Thanks again everyone. So, my previous build error was eliminated by wiping the build directory completely and starting from scratch. Maybe something is not cleaned up properly in the build directory even when doing clean rebuild (stuff created from the android tools, not the c++ compiler). Googling the internet for the "duplicate class" problem turned up some others having that issue that aren't using Qbs, recommending just wiping all build artifacts. Starting everything from scratch but with a QtApplication didn't work for me, I needed to set those two extra properties in the Qbs profile manually. But then it works! Finally, my app runs on the target Android device. Summary: - Clean install of QtCreator letting it set up Android SDK/NDK doesn't quite work, might need to set the two additional Qbs properties in the kit manually. In my case: Android.sdk.buildToolsVersion: 29.0.2 Android.sdk.platform: android-29 - Use QtApplication, not CppApplication. The QtCreator-wizard could need this change to avoid more confusion. Reported it here: https://bugreports.qt.io/browse/QTCREATORBUG-24783 - There might be some cleanup-issue in the build artifacts when messing around like I just did, causing the duplicate class error. Quick fix was to delete the whole build directory and try again. - Qt 5.15.x does not work for Android with Qbs yet, so I'll stick with Qt 5.14. Best regards, Ola
_______________________________________________ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs