Qt Android环境搭建遇到的问题汇总

来源:互联网 发布:知乎如何添加关注话题 编辑:程序博客网 时间:2024/06/04 18:27

问题1:android-19/arch-arm/:No such or directory


问题2:'C:\Program' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

解决:可能是arm编译器路径遇到空格的问题,将arm交叉编译器安装在C盘根目录。

问题3:mingw32-make: *** No rule to make target 'C:\Program Files\Android\android-ndk-r9c-windows-x86\android-ndk-r9c\sources\cxx-stl\gnu-libstdc++\4.8\include\utility', needed by 'main.obj'. Stop.

解决:重新qmake

问题4:系统找不到指定的路径。

Project ERROR: You need to set the ANDROID_NDK_ROOT environment variable to point to your Android NDK.
Could not read qmake configuration file C:/Qt/Qt5.2.0/5.2.0/android_armv7/mkspecs/android-g++/qmake.conf.

解决:

setx下载地址:
http://download.microsoft.com/download/win2000platform/setx/1.00.0.1/nt5/en-us/setx_setup.exe

NDK Setup

  • Download the NDK from here: http://developer.android.com/sdk/ndk/index.html
  • Unzip it somewhere, and note the root directory.
  • You need to set an environment variable named ANDROID_NDK_ROOT which points to this directory. This can be done from the command line:

 setx ANDROID_NDK_ROOT c:\android-ndk-r6 

附加博文:

vs-android
Integrated development of Android NDK C/C++ software under Visual Studio
http://code.google.com/p/vs-android/wiki/Installation
 

setx.exe设置系统环境变量

http://blog.csdn.net/panpanxj/article/details/5981328

问题5: Install to device: emulator-5554 

ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.

Installing to device failed!

-- Run with --verbose for more information.

解决:

file:///C:/apache-ant-1.9.2-bin/apache-ant-1.9.2/manual/index.html

Only the bin and lib directories are required to run Ant. To install Ant, choose a directory and copy the distribution files there. This directory will be known as ANT_HOME.

只有bin和lib目录都必须运行Ant 。安装Ant ,选择一个目录,并复制分发文件存在。该目录将被称作ANT_HOME。

file:///C:/apache-ant-1.9.2-bin/apache-ant-1.9.2/manual/index.html

Assume Ant is installed in c:\ant\. The following sets up the environment:

set ANT_HOME=c:\antset JAVA_HOME=c:\jdk-1.5.0.05set PATH=%PATH%;%ANT_HOME%\bin


0 0