Re: [Qbs] Issues building for Android
Hi, ok I created this issue: https://bugreports.qt.io/browse/QBS-1608 Can you close the qtc one? Thanks Raph Le jeu. 15 oct. 2020 à 13:33, Ola Røer Thorsen a écrit : > > tor. 15. okt. 2020 kl. 12:17 skrev Raphael Cotty >: > >> Hi, >> About the use of QtApplication instead of CppApplication in the wizard: >> I don't think it's a QtCreator issue. It's a qbs regression actually. >> The QtApplication.qbs not only adds a Depends on Qt.Core but it also >> changes the targetName for Android (in multiplex). >> Using the CppApplication.qbs even with a Depends on Qt.Core will fail on >> Android. >> >> Is it possible to move the issue to qbs? >> If not then I'll add one to discuss the different ways to solve it. >> > > Hi, I have not got the permissions to change the bug report. I can close > it however, if you make another one for Qbs instead. Let me know and I'll > close it. > > Btw I can also confirm that adding Depends { name: "Qt.core" } in > CppApplication didn't work. > > Best regards, > Ola > > ___ > Qbs mailing list > Qbs@qt-project.org > https://lists.qt-project.org/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
tor. 15. okt. 2020 kl. 12:17 skrev Raphael Cotty : > Hi, > About the use of QtApplication instead of CppApplication in the wizard: > I don't think it's a QtCreator issue. It's a qbs regression actually. > The QtApplication.qbs not only adds a Depends on Qt.Core but it also > changes the targetName for Android (in multiplex). > Using the CppApplication.qbs even with a Depends on Qt.Core will fail on > Android. > > Is it possible to move the issue to qbs? > If not then I'll add one to discuss the different ways to solve it. > Hi, I have not got the permissions to change the bug report. I can close it however, if you make another one for Qbs instead. Let me know and I'll close it. Btw I can also confirm that adding Depends { name: "Qt.core" } in CppApplication didn't work. Best regards, Ola ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
Hi, About the use of QtApplication instead of CppApplication in the wizard: I don't think it's a QtCreator issue. It's a qbs regression actually. The QtApplication.qbs not only adds a Depends on Qt.Core but it also changes the targetName for Android (in multiplex). Using the CppApplication.qbs even with a Depends on Qt.Core will fail on Android. Is it possible to move the issue to qbs? If not then I'll add one to discuss the different ways to solve it. Raph Le mer. 14 oct. 2020 à 21:49, Ola Røer Thorsen a écrit : > ons. 14. okt. 2020 kl. 21:03 skrev Raphael Cotty >: > >> 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 > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
ons. 14. okt. 2020 kl. 21:03 skrev Raphael Cotty : > 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
Re: [Qbs] Issues building for Android
Hi, Just tried the Qt Quick wizard. If you change the CppApplication into QtGuiApplication then it works (instead of QtApplication). Raph Le mer. 14 oct. 2020 à 20:45, Ola Røer Thorsen a écrit : > ons. 14. okt. 2020 kl. 19:55 skrev Richard Weickelt : > > >> Qt Creator is not part of the tests. We run everything with Qbs only on >> the >> command line in a Docker image. >> >> > Thanks!! > > Some progress now: first, if I set these two additional properties in the > Qbs-part of the kit, I get further building: > Android.sdk.buildToolsVersion: 29.0.2 > Android.sdk.platform: android-29 > > These two were empty when checking them for the kit used, so the build > part calling "aidl" failed. > > Also, the Qt Creator wizard setting up an empty Qt Quick project for Qbs > creates it with a CppApplication item, depending only on Qt.quick. This > caused a further problem "cannot find application binary". Fixed by using > the QtApplication item instead (just depending on Qt.core does not help). > > Now, the build fails because "Some input files use or override a > deprecated API" (I'll paste the build output below...) > > Best regards, > Ola > > > > Generating Android Package > Input file: > /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/androiddeployqt.json > Output directory: > /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/deployqt_out/ > Application binary: androidtest > Android build platform: android-29 > Install to device: No > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_arm64-v8a.so. > It has unmet dependencies: > lib/libQt5Svg_arm64-v8a.so,lib/libQt5Widgets_arm64-v8a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_arm64-v8a.so. > It has unmet dependencies: > lib/libQt5Svg_arm64-v8a.so,lib/libQt5Widgets_arm64-v8a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86_64.so. > It has unmet dependencies: > lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86_64.so. > It has unmet dependencies: > lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. > It has unmet dependencies: > lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. > It has unmet dependencies: > lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86.so. > It has unmet dependencies: lib/libQt5Svg_x86.so,lib/libQt5Widgets_x86.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86.so. > It has unmet dependencies: lib/libQt5Svg_x86.so,lib/libQt5Widgets_x86.so. > processing androiddeployqt outout [androidtest] > Stripping unneeded symbols from deployed qt libraries [androidtest] > processing resources [androidtest] > Error: Process '/usr/lib/jvm/java-8-openjdk-amd64/bin/java' finished with > exit code 1. The standard output was: > [ > ] > The standard error output was: > /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/gen/com/example/androidtest/BuildConfig.java:2: > error: duplicate class: com.example.androidtest.BuildConfig > public final class BuildConfig { > ^ > Note: Some input files use or override a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > 1 error > > The following products could not be built for configuration > Release_Android__97aac75243e7a13e: > androidtest > > > > > > ___ > Qbs mailing list > Qbs@qt-project.org > https://lists.qt-project.org/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
Hi, The error comes from this: home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/gen/com/example/androidtest/BuildConfig.java:2: error: duplicate class: com.example.androidtest.BuildConfig Can you send your project? Raph Le mer. 14 oct. 2020 à 20:45, Ola Røer Thorsen a écrit : > ons. 14. okt. 2020 kl. 19:55 skrev Richard Weickelt : > > >> Qt Creator is not part of the tests. We run everything with Qbs only on >> the >> command line in a Docker image. >> >> > Thanks!! > > Some progress now: first, if I set these two additional properties in the > Qbs-part of the kit, I get further building: > Android.sdk.buildToolsVersion: 29.0.2 > Android.sdk.platform: android-29 > > These two were empty when checking them for the kit used, so the build > part calling "aidl" failed. > > Also, the Qt Creator wizard setting up an empty Qt Quick project for Qbs > creates it with a CppApplication item, depending only on Qt.quick. This > caused a further problem "cannot find application binary". Fixed by using > the QtApplication item instead (just depending on Qt.core does not help). > > Now, the build fails because "Some input files use or override a > deprecated API" (I'll paste the build output below...) > > Best regards, > Ola > > > > Generating Android Package > Input file: > /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/androiddeployqt.json > Output directory: > /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/deployqt_out/ > Application binary: androidtest > Android build platform: android-29 > Install to device: No > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_arm64-v8a.so. > It has unmet dependencies: > lib/libQt5Svg_arm64-v8a.so,lib/libQt5Widgets_arm64-v8a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_arm64-v8a.so. > It has unmet dependencies: > lib/libQt5Svg_arm64-v8a.so,lib/libQt5Widgets_arm64-v8a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86_64.so. > It has unmet dependencies: > lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86_64.so. > It has unmet dependencies: > lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. > It has unmet dependencies: > lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. > It has unmet dependencies: > lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86.so. > It has unmet dependencies: lib/libQt5Svg_x86.so,lib/libQt5Widgets_x86.so. > -- Skipping > /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86.so. > It has unmet dependencies: lib/libQt5Svg_x86.so,lib/libQt5Widgets_x86.so. > processing androiddeployqt outout [androidtest] > Stripping unneeded symbols from deployed qt libraries [androidtest] > processing resources [androidtest] > Error: Process '/usr/lib/jvm/java-8-openjdk-amd64/bin/java' finished with > exit code 1. The standard output was: > [ > ] > The standard error output was: > /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/gen/com/example/androidtest/BuildConfig.java:2: > error: duplicate class: com.example.androidtest.BuildConfig > public final class BuildConfig { > ^ > Note: Some input files use or override a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > 1 error > > The following products could not be built for configuration > Release_Android__97aac75243e7a13e: > androidtest > > > > > > ___ > Qbs mailing list > Qbs@qt-project.org > https://lists.qt-project.org/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
ons. 14. okt. 2020 kl. 19:55 skrev Richard Weickelt : > Qt Creator is not part of the tests. We run everything with Qbs only on the > command line in a Docker image. > > Thanks!! Some progress now: first, if I set these two additional properties in the Qbs-part of the kit, I get further building: Android.sdk.buildToolsVersion: 29.0.2 Android.sdk.platform: android-29 These two were empty when checking them for the kit used, so the build part calling "aidl" failed. Also, the Qt Creator wizard setting up an empty Qt Quick project for Qbs creates it with a CppApplication item, depending only on Qt.quick. This caused a further problem "cannot find application binary". Fixed by using the QtApplication item instead (just depending on Qt.core does not help). Now, the build fails because "Some input files use or override a deprecated API" (I'll paste the build output below...) Best regards, Ola Generating Android Package Input file: /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/androiddeployqt.json Output directory: /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/deployqt_out/ Application binary: androidtest Android build platform: android-29 Install to device: No -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_arm64-v8a.so. It has unmet dependencies: lib/libQt5Svg_arm64-v8a.so,lib/libQt5Widgets_arm64-v8a.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_arm64-v8a.so. It has unmet dependencies: lib/libQt5Svg_arm64-v8a.so,lib/libQt5Widgets_arm64-v8a.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86_64.so. It has unmet dependencies: lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86_64.so. It has unmet dependencies: lib/libQt5Svg_x86_64.so,lib/libQt5Widgets_x86_64.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_x86.so. It has unmet dependencies: lib/libQt5Svg_x86.so,lib/libQt5Widgets_x86.so. -- Skipping /home/olathorsen/Qt/5.14.2/android/plugins/imageformats/libplugins_imageformats_qsvg_x86.so. It has unmet dependencies: lib/libQt5Svg_x86.so,lib/libQt5Widgets_x86.so. processing androiddeployqt outout [androidtest] Stripping unneeded symbols from deployed qt libraries [androidtest] processing resources [androidtest] Error: Process '/usr/lib/jvm/java-8-openjdk-amd64/bin/java' finished with exit code 1. The standard output was: [ ] The standard error output was: /home/olathorsen/src/build-androidtest-Android_Qt_5_14_2_Clang_Multi_Abi-Release/Release_Android__97aac75243e7a13e/androidtest.48600a3e/gen/com/example/androidtest/BuildConfig.java:2: error: duplicate class: com.example.androidtest.BuildConfig public final class BuildConfig { ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error The following products could not be built for configuration Release_Android__97aac75243e7a13e: androidtest ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
Hi, QtCreator manages the qbs configuration (in $HOME/.config/QtProjects/qtcreator/qbs/). In Options / Devices / Android widget you should be able to check if qtc is ok with your sdk and ndk. If you select a different path for your sdk/ndk then the qbs profile is/should be updated (not sure if it works properly). Raph Le mer. 14 oct. 2020 à 18:59, Ola Røer Thorsen a écrit : > man. 12. okt. 2020 kl. 20:34 skrev Raphael Cotty >: > >> Hi, >> Looks like your android profile is not correct. >> > > Agreed. (It was set up automatically by QtCreator). > > >> What do you have for the sdkDir/ndkDir keys? >> Are they pointing to the android sdk/ndk? >> > > Android.sdk.sdkDir: /home//Android/Sdk > Android.ndk.ndkDir: /home//Android/Sdk/ndk/21.1.6352462 > (these paths exist) > > I now also tried to build using Qt 5.14.2, but no change (still problems > starting with not finding the aidl tool). > > Seems like something is broken where the kit is set up, as the > Android.sdk.buildToolsVersion is not set. > > Is a clean install of Qt, QtCreator + QtCreator setting up the Android > SDK/NDK a part of the CI for Qbs? > > If anyone can share a complete and working android profile here, then I > can try to fill in the blanks in the QtCreator kit. > > Best regards, > Ola > > > > > ___ > Qbs mailing list > Qbs@qt-project.org > https://lists.qt-project.org/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
> I now also tried to build using Qt 5.14.2, but no change (still problems > starting with not finding the aidl tool). > > Seems like something is broken where the kit is set up, as the > Android.sdk.buildToolsVersion is not set. > > Is a clean install of Qt, QtCreator + QtCreator setting up the Android > SDK/NDK a part of the CI for Qbs? Qt Creator is not part of the tests. We run everything with Qbs only on the command line in a Docker image. Our jobs can be found here: https://code.qt.io/cgit/qbs/qbs.git/tree/.github/workflows/main.yml Example test job (Qt for Android 5.14): https://github.com/rweickelt/qbs/runs/1253245655 Docker image with Android SDK/NDK installed: https://code.qt.io/cgit/qbs/qbs.git/tree/docker/focal/test-android.Dockerfile > If anyone can share a complete and working android profile here, then I can > try to fill in the blanks in the QtCreator kit. The result of running qbs setup-android --ndk-dir ${ANDROID_HOME}/ndk-bundle --sdk-dir ${ANDROID_HOME} --qt-dir ${QT_INSTALL_DIR} qbs_autotests-android-qt is this: profiles.qbs_autotests-android-qt.Android.ndk.ndkDir: "/home/devel/android/ndk-bundle" profiles.qbs_autotests-android-qt.Android.ndk.platform: "android-21" profiles.qbs_autotests-android-qt.Android.sdk.ndkDir: "/home/devel/android/ndk-bundle" profiles.qbs_autotests-android-qt.Android.sdk.sdkDir: "/home/devel/android" profiles.qbs_autotests-android-qt.moduleProviders.Qt.qmakeFilePaths: "/opt/Qt/5.14.0/android/bin/qmake" profiles.qbs_autotests-android-qt.qbs.architecture: ["armv7a", "x86_64"] profiles.qbs_autotests-android-qt.qbs.targetPlatform: "android" profiles.qbs_autotests-android-qt.qbs.toolchainType: "clang" Taken from the linked job above. Richard ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
man. 12. okt. 2020 kl. 20:34 skrev Raphael Cotty : > Hi, > Looks like your android profile is not correct. > Agreed. (It was set up automatically by QtCreator). > What do you have for the sdkDir/ndkDir keys? > Are they pointing to the android sdk/ndk? > Android.sdk.sdkDir: /home//Android/Sdk Android.ndk.ndkDir: /home//Android/Sdk/ndk/21.1.6352462 (these paths exist) I now also tried to build using Qt 5.14.2, but no change (still problems starting with not finding the aidl tool). Seems like something is broken where the kit is set up, as the Android.sdk.buildToolsVersion is not set. Is a clean install of Qt, QtCreator + QtCreator setting up the Android SDK/NDK a part of the CI for Qbs? If anyone can share a complete and working android profile here, then I can try to fill in the blanks in the QtCreator kit. Best regards, Ola ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
Hi, > Hi, anyone know the status of building Qt apps for Android using Qbs now? > I've successfully done this before, but now I can't get it to work. Raphael Cotty has done some effort to keep it working. We are running regular tests for Qt 5.13 and 5.14 (multiple ABIs) in our CI. Qt 5.15 was missing so far (https://bugreports.qt.io/projects/QBS/issues/QBS-1580), but there is a good chance that this will be fixed soon. Best regards Richard Weickelt ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
Hi, Looks like your android profile is not correct. What do you have for the sdkDir/ndkDir keys? Are they pointing to the android sdk/ndk? Raph Le lun. 12 oct. 2020 à 15:49, Christian Kandeler a écrit : > On Mon, 12 Oct 2020 15:07:14 +0200 > Ola Røer Thorsen wrote: > > > The process '/Android/Sdk/build-tools/aidl' could not be started: > > execve: No such file or directory. > > Looks like Android.sdk.buildToolsVersion is empty. Please verify. However, > I think this should have resulted in an error message from the respective > Probe. Are you sure your project loaded without warnings? What if you set > "Force Probes" in the build settings? > > > Christian > ___ > Qbs mailing list > Qbs@qt-project.org > https://lists.qt-project.org/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
man. 12. okt. 2020 kl. 16:45 skrev Christian Kandeler < christian.kande...@qt.io>: > Do you have qbs.architectures set in your project? You could try setting > it to some permutations of the supported set (as printed by the quoted Qt > detection code), and see whether they all fail or just e.g. the ARM one. > They are set (automatically), the default values are armv7a,arm64,x86,x86_64. If I try to set the qbs.architectures property from within the project, then something else goes wrong so Qbs refuses to build ("module Qt.Quick could not be loaded" etc,). There is no GUI in QtCreator to set only one or more of the architectures as far as I can see. Also tried to set Android.sdk.buildToolsVersion: "29.0.2" in my project, that brings the build just slightly further, aidl E 10-12 17:16:49 10007 10007 aidl.cpp:411] cannot open preprocessed file: /home/olathorsen/Android/Sdk/platforms/framework.aidl here, the "missing" directory in platforms is called android-29 in the SDK. This is with using Qt 5.15.2 btw. I'll try 5.14 next to see if there is anything different there.. Last time I tried building for Android it did not try to multiplex building for all the architectures at once like this. Best regards, Ola ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
On Mon, 12 Oct 2020 16:20:44 +0200 Ola Røer Thorsen wrote: > Compiler feature detection failure! > The command > "/home/olathorsen/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ > -x c++ -E -dM -target arm-linux-androideabi -target '' -fPIC -std=c++14 -" > terminated with exit code 1. > error: unknown target triple 'unknown', please use -triple or -arch Do you have qbs.architectures set in your project? You could try setting it to some permutations of the supported set (as printed by the quoted Qt detection code), and see whether they all fail or just e.g. the ARM one. Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
man. 12. okt. 2020 kl. 15:49 skrev Christian Kandeler < christian.kande...@qt.io>: > Looks like Android.sdk.buildToolsVersion is empty. Please verify. However, > I think this should have resulted in an error message from the respective > Probe. Are you sure your project loaded without warnings? What if you set > "Force Probes" in the build settings? > > Force Probes had no additional effect. So far as I can see the buildToolsVersion property is "undefined". ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
man. 12. okt. 2020 kl. 15:49 skrev Christian Kandeler < christian.kande...@qt.io>: > On Mon, 12 Oct 2020 15:07:14 +0200 > Ola Røer Thorsen wrote: > > > The process '/Android/Sdk/build-tools/aidl' could not be started: > > execve: No such file or directory. > > Looks like Android.sdk.buildToolsVersion is empty. Please verify. However, > I think this should have resulted in an error message from the respective > Probe. Are you sure your project loaded without warnings? What if you set > "Force Probes" in the build settings? > Thanks Christian. How do I best verify that the buildToolsVersion is empty? The "dummy property console print trick?" Re-starting from scratch, I get this message in the "General Messages" log in Qt Creator: --- Performing API discovery ... Checking for license updates ... Checking for updated license succeeded (4 licenses fetched) [qbs] Build graph does not yet exist for configuration 'Debug_Android__fee4c0a9d0119005'. Starting from scratch. [qbs] Setting up Qt at '/home/olathorsen/Qt/5.15.1/android/bin/qmake'... [qbs] Qt with multiple abi detected: 'armeabi-v7a,arm64-v8a,x86,x86_64' [qbs] Configuring abi 'armeabi-v7a'... [qbs] Configuring abi 'arm64-v8a'... [qbs] Configuring abi 'x86'... [qbs] Configuring abi 'x86_64'... [qbs] Qt was set up successfully. Compiler feature detection failure! The command "/home/olathorsen/Android/Sdk/ndk/21.1.6352462/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -x c++ -E -dM -target arm-linux-androideabi -target '' -fPIC -std=c++14 -" terminated with exit code 1. error: unknown target triple 'unknown', please use -triple or -arch --- Again that looks like the sdk version is not set properly.. How do I set it manually? I guess it normally should be set automatically when the QtCreator kits are generated. Best regards, Ola > > Christian > ___ > Qbs mailing list > Qbs@qt-project.org > https://lists.qt-project.org/listinfo/qbs > ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
Re: [Qbs] Issues building for Android
On Mon, 12 Oct 2020 15:07:14 +0200 Ola Røer Thorsen wrote: > The process '/Android/Sdk/build-tools/aidl' could not be started: > execve: No such file or directory. Looks like Android.sdk.buildToolsVersion is empty. Please verify. However, I think this should have resulted in an error message from the respective Probe. Are you sure your project loaded without warnings? What if you set "Force Probes" in the build settings? Christian ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs
[Qbs] Issues building for Android
Hi, anyone know the status of building Qt apps for Android using Qbs now? I've successfully done this before, but now I can't get it to work. I've got QtCreator 4.13.2 installed, and have set up everything regarding the Android SDK/NDK from within QtCreator. Everything should be Ok (QtCreator says "Java Settings are OK", "Android settings are OK. (SDK Version: 3.1, NDK Version: 21.1.6352462)"; "OpenSSL Settings are OK".) If I create a new Qt Quick app from the QtCreator wizard, I can successfully build and deploy on my Android phone if I use either qmake or cmake. But for Qbs, it now ends with Processing IMinistroCallback.aidl [androidtest] Processing IMinistro.aidl [androidtest] copying Qt resource templates [androidtest] The process '/Android/Sdk/build-tools/aidl' could not be started: execve: No such file or directory. Looking inside the Sdk directory, the aidl binary is indeed not there, but rather found in the subdirectories 29.0.2 and 28.0.3. Known issue, new bug? Any hints how to get around this? Cheers, Ola ___ Qbs mailing list Qbs@qt-project.org https://lists.qt-project.org/listinfo/qbs