简体   繁体   中英

Necessitas (Qt/Android NDK) qmake paths

I am running openSUSE 12.2 64-bit trying to compile an app in 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. 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:

/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. I have checked through every tab of Tools->Options but see nowhere that references the incorrect folder. 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. So I installed the older JDK using synaptic and then ran:

sudo update-alternatives --config java

I selected the version 6 and re-ran the process. 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)

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. Did you install OpenJDK right before you tried to launch your app ? I am not certain where OpenJDK installs in OpenSUSE, but on my ArchLinux the variable had to be set to :

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

in order for QtCreator to compile the project properly.

In my case, I had Oracle's JDK installed, so right after installing OpenJDK, loging out and reloging updated my environment variables as wished.

There is also a similar post to yours: How to build my HelloWorld Android application with Necessitas (qt port)?

And you'll find a good necessitas starter video here : http://youtu.be/suPeZ7XC1xk

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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