Solved armv8 device, ABI is incompatible...?
-
Hi,
I'm new to Adroid deployment and trying to compile a simple project with Qt v14.1 and Qt Creator 4.11.1.
I've created a New project Qt Quick Application scroll.
I've selected the kits: Android for armeabi-v7a, arm64-v8a, x86, x86_64
I compile, here is what I get:18:30:48: Running steps for project testAdroid... 18:30:48: Starting: "/opt/Qt/5.14.1/android/bin/qmake" /android/testAdroid/testAdroid.pro -spec android-clang CONFIG+=debug CONFIG+=qml_debug ANDROID_ABIS=armeabi-v7a 18:30:48: The process "/opt/Qt/5.14.1/android/bin/qmake" exited normally. 18:30:48: Starting: "/home/bruel/android/android-ndk-r21/prebuilt/linux-x86_64/bin/make" -f /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/Makefile qmake_all make: Nothing to be done for 'qmake_all'. 18:30:48: The process "/home/bruel/android/android-ndk-r21/prebuilt/linux-x86_64/bin/make" exited normally. 18:30:48: Starting: "/home/bruel/android/android-ndk-r21/prebuilt/linux-x86_64/bin/make" -j8 /home/bruel/android/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target armv7a-linux-androideabi21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../testAdroid -I. -I/opt/Qt/5.14.1/android/include -I/opt/Qt/5.14.1/android/include/QtQuick -I/opt/Qt/5.14.1/android/include/QtGui -I/opt/Qt/5.14.1/android/include/QtQmlModels -I/opt/Qt/5.14.1/android/include/QtQml -I/opt/Qt/5.14.1/android/include/QtNetwork -I/opt/Qt/5.14.1/android/include/QtCore -Iarmeabi-v7a -I/opt/Qt/5.14.1/android/mkspecs/android-clang -o armeabi-v7a/main.o ../testAdroid/main.cpp /opt/Qt/5.14.1/android/bin/rcc -name qml ../testAdroid/qml.qrc -o armeabi-v7a/qrc_qml.cpp /home/bruel/android/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -c -target armv7a-linux-androideabi21 -fno-limit-debug-info -fPIC -fstack-protector-strong -DANDROID -g -marm -O0 -std=gnu++11 -Wall -W -D_REENTRANT -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_GUI_LIB -DQT_QMLMODELS_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -I../testAdroid -I. -I/opt/Qt/5.14.1/android/include -I/opt/Qt/5.14.1/android/include/QtQuick -I/opt/Qt/5.14.1/android/include/QtGui -I/opt/Qt/5.14.1/android/include/QtQmlModels -I/opt/Qt/5.14.1/android/include/QtQml -I/opt/Qt/5.14.1/android/include/QtNetwork -I/opt/Qt/5.14.1/android/include/QtCore -Iarmeabi-v7a -I/opt/Qt/5.14.1/android/mkspecs/android-clang -o armeabi-v7a/qrc_qml.o armeabi-v7a/qrc_qml.cpp /home/bruel/android/android-ndk-r21/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++ -target armv7a-linux-androideabi21 -fno-limit-debug-info -Wl,-soname,libtestAdroid_armeabi-v7a.so -Wl,--build-id=sha1 -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAdroid_armeabi-v7a.so armeabi-v7a/main.o armeabi-v7a/qrc_qml.o /opt/Qt/5.14.1/android/lib/libQt5Quick_armeabi-v7a.so /opt/Qt/5.14.1/android/lib/libQt5Gui_armeabi-v7a.so /opt/Qt/5.14.1/android/lib/libQt5QmlModels_armeabi-v7a.so /opt/Qt/5.14.1/android/lib/libQt5Qml_armeabi-v7a.so /opt/Qt/5.14.1/android/lib/libQt5Network_armeabi-v7a.so /opt/Qt/5.14.1/android/lib/libQt5Core_armeabi-v7a.so -lGLESv2 -llog -lz -lm -ldl -lc 18:30:49: The process "/home/bruel/android/android-ndk-r21/prebuilt/linux-x86_64/bin/make" exited normally. 18:30:49: Removing directory /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build/assets 18:30:49: Removing directory /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build/libs 18:30:49: Starting: "/home/bruel/android/android-ndk-r21/prebuilt/linux-x86_64/bin/make" INSTALL_ROOT=/android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build install /opt/Qt/5.14.1/android/bin/qmake -install qinstall -exe libtestAdroid_armeabi-v7a.so /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build/libs/armeabi-v7a/libtestAdroid_armeabi-v7a.so 18:30:49: The process "/home/bruel/android/android-ndk-r21/prebuilt/linux-x86_64/bin/make" exited normally. 18:30:49: Starting: "/opt/Qt/5.14.1/android/bin/androiddeployqt" --input /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-testAdroid-deployment-settings.json --output /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build --android-platform android-29 --jdk /opt/jdk1.8.0_171 --gradle Generating Android Package Input file: /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-testAdroid-deployment-settings.json Output directory: /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build/ Application binary: testAdroid Android build platform: android-29 Install to device: No Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Fusion.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Imagine.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl -- Skipping /opt/Qt/5.14.1/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. -- Skipping /opt/Qt/5.14.1/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so,lib/libQt5Widgets_armeabi-v7a.so. > Task :preBuild UP-TO-DATE > Task :preDebugBuild UP-TO-DATE > Task :compileDebugAidl UP-TO-DATE > Task :compileDebugRenderscript NO-SOURCE > Task :checkDebugManifest UP-TO-DATE > Task :generateDebugBuildConfig UP-TO-DATE > Task :javaPreCompileDebug UP-TO-DATE > Task :mainApkListPersistenceDebug UP-TO-DATE > Task :generateDebugResValues UP-TO-DATE > Task :generateDebugResources UP-TO-DATE > Task :mergeDebugResources UP-TO-DATE > Task :createDebugCompatibleScreenManifests UP-TO-DATE > Task :processDebugManifest UP-TO-DATE > Task :processDebugResources UP-TO-DATE > Task :compileDebugJavaWithJavac UP-TO-DATE > Task :compileDebugSources UP-TO-DATE > Task :mergeDebugShaders UP-TO-DATE > Task :compileDebugShaders UP-TO-DATE > Task :generateDebugAssets UP-TO-DATE > Task :mergeDebugAssets > Task :processDebugJavaRes NO-SOURCE > Task :mergeDebugJavaResource UP-TO-DATE > Task :checkDebugDuplicateClasses UP-TO-DATE > Task :mergeExtDexDebug UP-TO-DATE > Task :transformClassesWithDexBuilderForDebug UP-TO-DATE > Task :mergeDexDebug UP-TO-DATE > Task :validateSigningDebug UP-TO-DATE > Task :signingConfigWriterDebug UP-TO-DATE > Task :mergeDebugJniLibFolders UP-TO-DATE > Task :mergeDebugNativeLibs UP-TO-DATE > Task :stripDebugDebugSymbols UP-TO-DATE Compatible side by side NDK version was not found. > Task :packageDebug > Task :assembleDebug BUILD SUCCESSFUL in 5s 25 actionable tasks: 2 executed, 23 up-to-date Android package built successfully in 6.621 ms. -- File: /android/build-testAdroid-Android_for_armeabi_v7a_arm64_v8a_x86_x86_64_Clang_Qt_5_14_1_for_Android-Debug/android-build//build/outputs/apk/debug/android-build-debug.apk
Then I try to launch it in Debug on my device which is a Xiaomi Redmi Note 5. CPU: Snapdragon 625 (armv8)
Here is what I get:
I've activated the dev options on the phone with the USB debugging.
Here is the result of adb devices:~/android$ ./sdk/platform-tools/adb devices -l List of devices attached 5b516a12 no permissions (user in plugdev group; are your udev rules wrong?); see [http://developer.android.com/tools/device.html] usb:1-1 transport_id:2
If I look the compilation output, it seems it built only one apk and for armv7. Am I wrong?
How can I build for armv8? (arm64-v8a) I've tried to set the build environment variable ANDROID_TARGET_ARCH without success... (I've seen this here)/opt/Qt/5.14.1/android/lib/libQt5Quick_armeabi-v7a.so:-1: error: error adding symbols: File in wrong format
How can I build an AAB that would have all versions?
Thanks in advance for the help...
I find it quite hard at the beginning to start deploying app on Android...
I remember I tried it few years ago and it was working straight away, probably it was armv7 devices... -
Ok my bad, it seems the problem was caused by my device that was not recognized...
Following this link, I've created the udev rule, reloaded the rules so my device is now seen with adbbruel@riyad:~/android$ ./sdk/platform-tools/adb devices -l List of devices attached 5b516a12 device usb:1-1 product:whyred model:Redmi_Note_5 device:whyred transport_id:1
And the application is installed using QtCreator and launched properly \o/
Do I have to manually create a udev rule for all the new device I wish to test?