经过一些网页浏览后,我仍然无法弄清楚为什么当我在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 update sdk
命令安装了Android API 23 SDK工具:
路径(jdk,sdk,ndk,ant)似乎在QtCreator中正确设置>工具>选项>机器人。
由于
答案 0 :(得分:0)
我只是重新安装NDK,现在工作正常......
有时它很奇怪......