2014-12-24 57 views
-3

我在Qt4.x中創建了項目,現在我正在Qt5.3.1上編譯此項目。 該項目編譯良好的Windows但編譯爲Android時,我得到以下錯誤我在Qt中編譯項目時出現錯誤

:-1:錯誤:沒有規則,使目標'........ \ Softwares \ Android的SDK-NDK-ANT \ android-ndk-r9d-windows-x86_64 \ android-ndk-r9d \ sources \ cxx-stl \ gnu-libstdC++ \ 4.8 \ include \ profile \ impl \ profiler_map_to_unordered_map.h','ui_main_window.h'需要。停止提前

回答

3

這是最有可能涉及到this bug這也是在this blog post討論

請幫幫忙,謝謝 。你在Windows上(第一提示),你的NDK路徑似乎很長(第二提示)。這些事實與Qt Creator傾向於創建的漫長路徑相結合,會產生很長的時間來達到操作系統限制的路徑,然後奇怪而神祕的錯誤可能會從任何地方跳出。

直接引用鏈接的帖子:

Try installing the NDK directly in the root with a short directory name, and have a shallow directory structure for the project you are building. If you still have problems, try turning off shadow building, as this appends a long directory name to your path.

個人而言,我已經:

  • C:\AdtBundle\sdk
  • C:\AdtBundle\ndk9d
  • C:\Ant(很多部署錯誤的發生有關Ant一個錯誤的決定目錄路徑...)

設置這樣簡單的目錄結構後,我已經從來沒有遇到任何奇怪的錯誤,由於過長/糟糕的路徑。

相關問題