2014-02-19 23 views
4

我在看的附带QT Qt的传感器的示例应用程序,我已经没有任何错误,当我试图把它放到我的Android遵守它的窗口,但我得到这个编译错误。传感器的Qt编译设为Qml错误

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. 

我已经看过谷歌无济于事。任何人都可以帮我解决这个问题吗?

回答

0

似乎错误或其中至少有一个是因为路径到您的文件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. 

尝试编译并在较短路径的不同位置运行项目。

+0

我想你的建议,这是错误现在我得到:-1:错误:没有规则,使目标” .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ .. \ Android_Bundle \机器人-NDK-R9C \源\ CXX-STL \ GNU-的libstdC++ \ 4.8 \库\ armeabi-V7A \包括\比特\ C++ config.h','main.obj'需要。停止。 – TheMan68

0

我得到这个例子中的错误(和对前面的例子一样,而一些前)。

我的问题竟然是所产生的Makefile文件时,它会产生“错误”的代码。它产生的东西,如: 的mkdir C:$(INSTALL_ROOT)/ ........

这是好的,如果$(INSTALL_ROOT)计算结果为相对路径,但实际上它解析为绝对路径,即是: mkdir C:C:/ Qt/.......

因此只需编辑Makefile,用'$(INSTALL_ROOT)'替换所有出现的'C:$(INSTALL_ROOT)'。它为我工作,希望你也是。