将环境升级到VS2017-15.9,QT 5.12.3,Android SDK Level-23,NDK-r19c,我开始遇到以下奇怪的错误。
<built-in>:1:10: fatal error: 'common' file not found
。它说的文件是<built-in>
!
完全错误如下所示。
15:48:56: Running steps for project projectx...
15:48:56: Configuration unchanged, skipping qmake step.
15:48:56: Starting: "C:\android\android-ndk\prebuilt\windows\bin\make.exe" -j8
cd src\common\ && ( if not exist Makefile C:\Qt\5.12\5.12.3\android_armv7\bin\qmake.exe -o Makefile C:\testrepo\pay\projectx\src\common\common.pro -spec android-clang "CONFIG+=debug" "CONFIG+=qml_debug" ) && C:/android/android-ndk/prebuilt/windows/bin/make -f Makefile
make[1]: Entering directory `C:/testrepo/pay/build-projectx-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/src/common'
C:\android\android-ndk/toolchains/llvm/prebuilt/windows/bin/clang++ -D__ANDROID_API__=23 -target armv7-none-linux-androideabi -gcc-toolchain C:\android\android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/windows -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=C:\android\android-ndk/sysroot -isystem C:\android\android-ndk/sysroot/usr/include/arm-linux-androideabi -isystem C:\android\android-ndk/sources/cxx-stl/llvm-libc++/include -isystem C:\android\android-ndk/sources/android/support/include -isystem C:\android\android-ndk/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -fPIC -std=gnu++14 -Wall -W -D_REENTRANT -DQT_FORCE_ASSERTS -DQCLS_ANDROID -DQT_FORCE_ASSERTS -DQCLS_ANDROID -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_SQL_LIB -DQT_SERIALPORT_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB -I..\..\..\projectx\src\common -I. -I..\..\..\projectx\include -IC:\android\android-ndk/sysroot/usr/usr/include/ -IC:\Qt\5.12\5.12.3\android_armv7\include -IC:\Qt\5.12\5.12.3\android_armv7\include\QtQuick -IC:\Qt\5.12\5.12.3\android_armv7\include\QtMultimedia -IC:\Qt\5.12\5.12.3\android_armv7\include\QtSvg -IC:\Qt\5.12\5.12.3\android_armv7\include\QtWidgets -IC:\Qt\5.12\5.12.3\android_armv7\include\QtGui -IC:\Qt\5.12\5.12.3\android_armv7\include\QtQml -IC:\Qt\5.12\5.12.3\android_armv7\include\QtNetwork -IC:\Qt\5.12\5.12.3\android_armv7\include\QtConcurrent -IC:\Qt\5.12\5.12.3\android_armv7\include\QtSql -IC:\Qt\5.12\5.12.3\android_armv7\include\QtSerialPort -IC:\Qt\5.12\5.12.3\android_armv7\include\QtAndroidExtras -IC:\Qt\5.12\5.12.3\android_armv7\include\QtCore -I. -IC:\Qt\5.12\5.12.3\android_armv7\mkspecs\android-clang -x c++-header -c ..\..\..\projectx\src\common\pch.h -o common\c++.gch
C:\android\android-ndk/toolchains/llvm/prebuilt/windows/bin/clang++ -c -include common -D__ANDROID_API__=23 -target armv7-none-linux-androideabi -gcc-toolchain C:\android\android-ndk/toolchains/arm-linux-androideabi-4.9/prebuilt/windows -fno-limit-debug-info -DANDROID_HAS_WSTRING --sysroot=C:\android\android-ndk/sysroot -isystem C:\android\android-ndk/sysroot/usr/include/arm-linux-androideabi -isystem C:\android\android-ndk/sources/cxx-stl/llvm-libc++/include -isystem C:\android\android-ndk/sources/android/support/include -isystem C:\android\android-ndk/sources/cxx-stl/llvm-libc++abi/include -fstack-protector-strong -DANDROID -march=armv7-a -mfloat-abi=softfp -mfpu=vfp -fno-builtin-memmove -g -g -marm -O0 -fPIC -std=gnu++14 -Wall -W -D_REENTRANT -DQT_FORCE_ASSERTS -DQCLS_ANDROID -DQT_FORCE_ASSERTS -DQCLS_ANDROID -DQT_QML_DEBUG -DQT_QUICK_LIB -DQT_MULTIMEDIA_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_SQL_LIB -DQT_SERIALPORT_LIB -DQT_ANDROIDEXTRAS_LIB -DQT_CORE_LIB -I..\..\..\projectx\src\common -I. -I..\..\..\projectx\include -IC:\android\android-ndk/sysroot/usr/usr/include/ -IC:\Qt\5.12\5.12.3\android_armv7\include -IC:\Qt\5.12\5.12.3\android_armv7\include\QtQuick -IC:\Qt\5.12\5.12.3\android_armv7\include\QtMultimedia -IC:\Qt\5.12\5.12.3\android_armv7\include\QtSvg -IC:\Qt\5.12\5.12.3\android_armv7\include\QtWidgets -IC:\Qt\5.12\5.12.3\android_armv7\include\QtGui -IC:\Qt\5.12\5.12.3\android_armv7\include\QtQml -IC:\Qt\5.12\5.12.3\android_armv7\include\QtNetwork -IC:\Qt\5.12\5.12.3\android_armv7\include\QtConcurrent -IC:\Qt\5.12\5.12.3\android_armv7\include\QtSql -IC:\Qt\5.12\5.12.3\android_armv7\include\QtSerialPort -IC:\Qt\5.12\5.12.3\android_armv7\include\QtAndroidExtras -IC:\Qt\5.12\5.12.3\android_armv7\include\QtCore -I. -IC:\Qt\5.12\5.12.3\android_armv7\mkspecs\android-clang -o enumhelper.obj ..\..\..\projectx\src\common\common\enumhelper.cpp
<built-in>:1:10: fatal error: 'common' file not found
#include "common"
^~~~~~~~
1 error generated.
make[1]: *** [enumhelper.obj] Error 1
make[1]: Leaving directory `C:/testrepo/pay/build-projectx-Android_for_armeabi_v7a_Clang_Qt_5_12_3_for_Android_ARMv7-Debug/src/common'
make: *** [sub-src-common-make_first] Error 2
15:48:58: The process "C:\android\android-ndk\prebuilt\windows\bin\make.exe" exited with code 2.
Error while building/deploying project projectx (kit: Android for armeabi-v7a (Clang Qt 5.12.3 for Android ARMv7))
When executing step "Make"
15:48:58: Elapsed time: 00:02.
btw,使用VS-2017-15.6,QT-5.10.1,Android-19,NDK-16b构建项目没有问题。所以我想我的新堆栈有一些问题。