我正在看Qt附带的qt传感器的示例应用程序,我已经在windows上编译了它,没有错误,但当我试图将它放到我的android上时,我得到了这个编译错误。
10:41:51: Running steps for project qmlqtsensors...
10:41:51: Configuration unchanged, skipping qmake step.
10:41:51: Starting: "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe"
mingw32-make: Nothing to be done for 'first'.
10:41:52: The process "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" exited normally.
10:41:52: Removing directory C:\Qt\Qt5.2.1\5.2.1\android_x86\examples\sensors\build-qmlqtsensors-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Release\android-build
10:41:52: Starting: "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" INSTALL_ROOT="C:\Qt\Qt5.2.1\5.2.1\android_x86\examples\sensors\build-qmlqtsensors-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Release\android-build" install
copy /y "libqmlqtsensors.so" "C:\Qt\Qt5.2.1\5.2.1\android_x86\examples\sensors\build-qmlqtsensors-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Release\android-build\libs\armeabi-v7a\libqmlqtsensors.so"
1 file(s) copied.
The full path of C:C:\Qt\Qt5.2.1\5.2.1\android_x86\examples\sensors\build-qmlqtsensors-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Release\android-build\Qt\Qt5.2.1\5.2.1\android_armv7\examples\qtsensors\qmlqtsensors is too long.
makefile:873: recipe for target 'install_app' failed
mingw32-make: *** [install_app] Error 1
10:41:53: The process "C:\Qt\Qt5.2.1\Tools\mingw48_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project qmlqtsensors (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
When executing step 'Copy application data'
10:41:53: Elapsed time: 00:02.我已经在谷歌上找过了,但一无所获。有人能帮我解决这个问题吗?
发布于 2014-02-20 21:28:39
这个错误或者至少有一个错误是因为你的文件qmlqtsensors的路径太长了。
The full path of C:C:\Qt\Qt5.2.1\5.2.1\android_x86\examples\sensors\build-qmlqtsensors-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Release\android-build\Qt\Qt5.2.1\5.2.1\android_armv7\examples\qtsensors\qmlqtsensors is too long.尝试使用较短的路径在不同的位置编译和运行项目。
发布于 2014-03-17 23:16:44
我在这个例子中得到了错误(不久前在前面的例子中也有同样的错误)。
我的问题是,当生成Makefile时,它会生成“错误的”代码。它生成如下内容: mkdir C:$(INSTALL_ROOT)/........
如果$(INSTALL_ROOT)计算为相对路径,但实际上它解析为绝对路径,也就是: mkdir C:C:/Qt/.......
因此,只需编辑Makefile,将所有出现的'C:$(INSTALL_ROOT)‘替换为'$(INSTALL_ROOT)’。它对我起作用了,希望你也是。
https://stackoverflow.com/questions/21870482
复制相似问题