[SOLVED] Getting Necessitas to work?
-
Hi there, I have problems getting Necessitas to work.
I have installed Necessitas, ant, JDK and pretty much went though the install guide step by step.
Test projects compile, however when I try to run a project I get an error:
bq. :-1: error: Packaging Error: Command 'd:\necessitas/apache-ant-1.8.2/bin/ant.bat clean debug' failed.Exit code: 1
Any ideas?
-
OK, a quick update:
There were some environment variable conflicts which I resolved and now the simulator runs but as soon as it is responsive it displays a message:
bq. Sorry!
The process android.process.acore has stopped unexpetedly. Please try again.So I force close.
The Ministro starts downloading packages, I get the same error message during the download but it doesn't get interrupted. When all Qt libs are downloaded, I get another error message:
bq. Your application encountered a fatal error and cannot continue.
Here is the compiler output:
bq. Starting remote process ...
D/dalvikvm( 401): GC_EXTERNAL_ALLOC freed 48K, 53% free 2554K/5379K, external 1625K/2137K, paused 125ms
D/dalvikvm( 401): GC_EXTERNAL_ALLOC freed 1K, 53% free 2553K/5379K, external 3125K/3903K, paused 29ms
D/dalvikvm( 401): DexOpt: --- BEGIN 'QtIndustrius-14.jar' (bootstrap=0) ---
D/dalvikvm( 401): DexOpt: --- END 'QtIndustrius-14.jar' (success) ---
D/dalvikvm( 401): DEX prep '/data/data/org.kde.necessitas.ministro/files/qt/jar/QtIndustrius-14.jar': unzip in 163ms, rewrite 503ms
D/dalvikvm( 401): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x4050fcd0
D/dalvikvm( 401): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x4050fcd0
D/dalvikvm( 401): No JNI_OnLoad found in /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x4050fcd0, skipping init
D/dalvikvm( 401): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x4050fcd0
D/dalvikvm( 401): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x4050fcd0
D/dalvikvm( 401): No JNI_OnLoad found in /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x4050fcd0, skipping init
D/dalvikvm( 401): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so 0x4050fcd0
D/dalvikvm( 401): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so 0x4050fcd0
I/Qt ( 401): qt start
I/Qt JAVA ( 401): Can't find '/data/data/org.kde.necessitas.example.mobiletest/lib/libmobiletest.so
W/dalvikvm( 401): No implementation found for native Lorg/kde/necessitas/industrius/QtNative;.startQtApp (Ljava/lang/String;Ljava/lang/String;)V
W/System.err( 401): java.lang.reflect.InvocationTargetException
W/System.err( 401): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 401): at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err( 401): at org.kde.necessitas.origo.QtActivity.loadApplication(QtActivity.java:150)
W/System.err( 401): at org.kde.necessitas.origo.QtActivity.access$200(QtActivity.java:77)
W/System.err( 401): at org.kde.necessitas.origo.QtActivity$3$1$1.run(QtActivity.java:201)
W/System.err( 401): at android.os.Handler.handleCallback(Handler.java:587)
W/System.err( 401): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err( 401): at android.os.Looper.loop(Looper.java:123)
W/System.err( 401): at android.app.ActivityThread.main(ActivityThread.java:3683)
W/System.err( 401): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 401): at java.lang.reflect.Method.invoke(Method.java:507)
W/System.err( 401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
W/System.err( 401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
W/System.err( 401): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 401): Caused by: java.lang.UnsatisfiedLinkError: startQtApp
W/System.err( 401): at org.kde.necessitas.industrius.QtNative.startQtApp(Native Method)
W/System.err( 401): at org.kde.necessitas.industrius.QtNative.startApplication(QtNative.java:183)
W/System.err( 401): at org.kde.necessitas.industrius.QtActivityDelegate.startApplication(QtActivityDelegate.java:300)
W/System.err( 401): ... 14 more
I/Qt JAVA ( 401): surfaceChanged: 480,762,480,762
I/Qt JAVA ( 401): surfaceDestroyed
I/Qt JAVA ( 401): onDestroy'org.kde.necessitas.example.mobiletest' died
-
Ant is now included in Necessitas SDK, as well as droid SDK and NDK. Instructions on SF and QtDN pages are outdated. Apart from that, I can't help much, as I am using N on GNU/Linux, where everything works pretty much out of the box.
You can try asking on Necessitas' Google Group: "link":https://groups.google.com/forum/#!forum/android-qt.
-
Yes, I actually used the versions of JDK and NDK and Ant that are included with Necessitas.
Just a quick idea - since I wanted to target Tegra 2 I installed only the arm v7 libraries, perhaps the simulator has problems, I am currently downloading the v5 libs to test if there is any improvement.
-
After lots of pain I got a widget and a push button to show up on the screen.
There seems to be an issue with Ministro 2, with the first version it actually works.
As for the continuous fatal error I get it doesn't seem to be Qt/N related, I found many people get the same continiously popping error on actual devices. For some reason it is much worse on API level 13 than for example level API 10.
In the case of the API level 10 emulator, this solution, applicable to physical devices WORKS!!!
bq. If you go to Settings/Applications/Manage Applications/ then choose the All tab. Scroll down to Contacts open it and clear the data cache. Now do the same again but this time open Contact Storage and also clear the data cache. This issue is related to an Android bug and affects many devices. It's related to apps that use the sync function.
I just hope I will have more luck with deploying apps to testing tablet.
-
Probably won't get much better now that ICS is in place with it's API 15 :)
Seems reasonable that API 10 is a bit more stable, as it is around for much longer, and is actually being used by most devices (Android 2.3.3- .7, that means basically all current smartphones). Anyway, good to know you managed to get it working.
-
LOL, and back to square one, after spending 4 hours to make it work at the office I repeated everything back at home and am stuck at the first error message I got :)
Such a shame my Ubuntu config is out of disk space, will have to remove the vanilla Qt SDK to make some room for Necessitas.
-
It appears that there might be some problem with the version of ant provided with Necessitas, at least in my case (windows 7 x64), for some reason nothing made it work until I installed winant in the same location.
That fixed it right away.
Also I had no luck with the "read information from application" feature that is supposed to scan which modules of Qt are needed, ain't working both in the office and at home, have to manually select the Qt libraries used by the project.
EDIT:
After toying with Necessitas the last few days under both Windows and Ubunty my conclusion is the majority of issues lie within ant. It just plainly sucks, its performance, its stability, the very act of actually working as intended... I've had a ton of stock Qt examples and personal code that failed miserably to deploy on the simulator while the actual APK files installed and ran flawlessly on my Transformer TF101.
Ironically, it is exactly ant that has the audacity to ask for donations "in case I liked it"... well no, I didn't like it at all...
A friendly advice - deploy on an actual device and don't even bother with ant for the time being.