gpt4 book ai didi

android - Android 版 Qt : QtCreator build/deploy error when executing step "Build Android APK"

转载 作者:太空宇宙 更新时间:2023-11-04 13:26:10 24 4
gpt4 key购买 nike

浏览了一些网页后,我仍然无法弄清楚为什么在 Qt Creator 中为 Android 构建一个简单的基本 Qt 项目时出现以下错误:

10:01:29: Starting: "/usr/bin/make" 
/home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv5/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv5/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
10:01:29: The process "/usr/bin/make" exited normally.
10:01:29: Removing directory /home/qt-android-projects/testandroid/build/android-build
10:01:29: Starting: "/usr/bin/make" INSTALL_ROOT=/home/qt-android-projects/testandroid/build/android-build install
/home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv5/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv5/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
install -m 755 -p libtestAndroid.so /home/qt-android-projects/testandroid/build/android-build/libs/armeabi/libtestAndroid.so
Makefile:1707: recipe for target 'install_target' failed
install: cannot stat 'libtestAndroid.so': No such file or directory
[install_target] Error 1 (ignored)
11:41:30: The process "/usr/bin/make" exited normally.
11:41:30: Removing directory /home/qt-android-projects/testandroid/build/android-build
11:41:30: Starting: "/usr/bin/make" INSTALL_ROOT=/home/qt-android-projects/testandroid/build/android-build install
/home/android-ndk-r10e/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/arm-linux-androideabi-g++ --sysroot=/home/android-ndk-r10e/platforms/android-9/arch-arm/ -Wl,-soname,libtestAndroid.so -Wl,-rpath=/home/Qt5.5.1-for-android/5.5/android_armv7/lib -Wl,--no-undefined -Wl,-z,noexecstack -shared -o libtestAndroid.so main.o mainwindow.o moc_mainwindow.o -L/home/android-ndk-r10e/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a -L/home/android-ndk-r10e/platforms/android-9/arch-arm//usr/lib -L/home/Qt5.5.1-for-android/5.5/android_armv7/lib -lQt5Widgets -L/opt/android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a -L/opt/android/ndk/platforms/android-9/arch-arm//usr/lib -lQt5Gui -lQt5Core -lGLESv2 -lgnustl_shared -llog -lz -lm -ldl -lc -lgcc
install -m 755 -p libtestAndroid.so /home/qt-android-projects/testandroid/build/android-build/libs/armeabi-v7a/libtestAndroid.so
Makefile:1707: recipe for target 'install_target' failed
install: cannot stat 'libtestAndroid.so': No such file or directory
make: [install_target] Error 1 (ignored)
11:41:30: The process "/usr/bin/make" exited normally.
11:41:30: Starting: "/home/Qt5.5.1-for-android/5.5/android_armv7/bin/androiddeployqt" --input /home/qt-android-projects/testandroid/build/android-libtestAndroid.so-deployment-settings.json --output /home/qt-android-projects/testandroid/build/android-build --deployment bundled --android-platform android-23 --jdk /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.60-14.b27.fc21.x86_64 --ant /usr/bin/ant
Cannot find application binary /home/qt-android-projects/testandroid/build/libtestAndroid.so.
11:41:30: The process "/home/Qt5.5.1-for-android/5.5/android_armv7/bin/androiddeployqt" exited with code 2.
Error while building/deploying project testAndroid (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.5.1))
When executing step "Build Android APK"
11:41:30: Elapsed time: 00:04.

我的路径中没有空格。

如某些相关帖子所述,当我跳过 make install 步骤时,没有比这更好的了。它只是不显示以下几行:

Makefile:1707: recipe for target 'install_target' failed
install: cannot stat 'libtestAndroid.so': No such file or directory

系统配置:

在 Linux Fedora 下,为 the Qt's guide状态,我得到了:

  • Android SDK 工具 (r24.4.1)
  • Android NDK (r10e-rc4)
  • Apache ant(/usr/bin/中的 1.9 版)
  • Java SE 开发套件 (java-1.8.0-openjdk-1.8.0.60-14.b27.fc21.x86_64)
  • Android 版 Qt5(5.5.1 版)

我已经使用 ./android update sdk 命令安装了 Android API 23 SDK 工具:

enter image description here

路径(jdk、sdk、ndk、ant)似乎在 QtCreator > Tools > Options > Android 中正确设置。

谢谢

最佳答案

我刚刚重新安装了 NDK,它现在工作正常...

有时候很奇怪...

关于android - Android 版 Qt : QtCreator build/deploy error when executing step "Build Android APK",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33299647/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com