简体   繁体   English

Necessitas(Qt / Android NDK)qmake路径

[英]Necessitas (Qt/Android NDK) qmake paths

I am running openSUSE 12.2 64-bit trying to compile an app in Necessitas alpha 4.1. 我正在运行openSUSE 12.2 64位尝试在Necessitas alpha 4.1中编译应用程序。 It's a basic app and the code is likely not the issue. 这是一个基本的应用程序,代码可能不是问题。 Through the course of tracing the issue I made sure to have all dependencies and tools.jar, which can apparently cause similar errors. 通过跟踪问题的过程,我确保拥有所有依赖项和tools.jar,这显然会导致类似的错误。 When compiling I get: 编译时我得到:

Packaging Error: Command '/usr/bin/ant clean debug' failed.Exit code: 1
File not found:

No file is actually listed. 实际上没有列出任何文件。 I copy/pasted this line from Projects->Build Steps->qmake: 我从Projects-> Build Steps-> qmake复制/粘贴了这一行:

/home/mark/Software/necessitas/Android/Qt/482/armeabi-v7a/bin/qmake /home/mark/Dev/qt/myProject/myProject.pro -r -spec android-g++ CONFIG+=debug CONFIG+=declarative_debug

Then I pasted in a terminal window and the result is: 然后我粘贴在终端窗口中,结果是:

sh: /home/mark/necessitas/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/arm-linux-androideabi-gcc: No such file or directory

This is obviously incorrect as my path is ~/Software/necessitas not ~/necessitas. 这显然是不正确的,因为我的路径是〜/ Software / necessitas not~ / necessitas。 I have checked through every tab of Tools->Options but see nowhere that references the incorrect folder. 我已经检查了Tools-> Options的每个选项卡,但看不到引用错误文件夹的地方。 Any clue where this is supposed to go? 应该去哪里的任何线索?

I had this exact error last night. 昨晚我有这个确切的错误。 However I noticed that the Google documentation specifically said java-6-openjdk. 但是我注意到Google文档特别说java-6-openjdk。 So I installed the older JDK using synaptic and then ran: 所以我使用synaptic安装了旧的JDK然后运行:

sudo update-alternatives --config java

I selected the version 6 and re-ran the process. 我选择了版本6并重新运行了该过程。 Which completed successfully. 哪个成功完成。

(To be fair I was using Qt 5.1 beta 1 and freshly downloaded NDK and SDK's, ant was 1.8.1 from the repositories) (公平地说,我使用的是Qt 5.1 beta 1并且刚刚下载了NDK和SDK,蚂蚁是来自存储库的1.8.1)

Were you able to resolve your problem in the mean time ? 你能在同一时间解决问题吗?

This has to do with the Java environment variables, more precisely with JAVA_HOME. 这与Java环境变量有关,更准确地说与JAVA_HOME有关。 Did you install OpenJDK right before you tried to launch your app ? 您是否在尝试启动应用程序之前安装了OpenJDK? I am not certain where OpenJDK installs in OpenSUSE, but on my ArchLinux the variable had to be set to : 我不确定OpenJDK在OpenSUSE中的安装位置,但在我的ArchLinux上,变量必须设置为:

JAVA_HOME=/usr/lib/jvm/java-7-openjdk

in order for QtCreator to compile the project properly. 为了让QtCreator正确编译项目。

In my case, I had Oracle's JDK installed, so right after installing OpenJDK, loging out and reloging updated my environment variables as wished. 在我的例子中,我安装了Oracle的JDK,因此在安装OpenJDK之后,注销并重新编译已更新的环境变量。

There is also a similar post to yours: How to build my HelloWorld Android application with Necessitas (qt port)? 还有一个类似的帖子: 如何使用Necessitas(qt端口)构建我的HelloWorld Android应用程序?

And you'll find a good necessitas starter video here : http://youtu.be/suPeZ7XC1xk 你会在这里找到一个很好的必需品入门视频:http: //youtu.be/suPeZ7XC1xk

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM