Qt Necessitas error - Can't find Ministro service

梦想与她 提交于 2019-12-30 07:06:15

问题


I downloaded the Necessitas installer for Linux, but I can't make my "Hello World" Qt application run on the debugger's Android VM.

It gives this error:

Can't find Ministro service.
The application can't start.

And this is the Debug log from Qt Creator:

Starting remote process...D/dalvikvm( 2497): GC freed 699 objects / 55432 bytes in 152ms
D/dalvikvm( 2497): GC freed 65 objects / 2640 bytes in 58ms
W/System.err( 2497): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=market://search?q=pname:org.kde.necessitas.ministro }
W/System.err( 2497):    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1408)
W/System.err( 2497):    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1378)
W/System.err( 2497):    at android.app.Activity.startActivityForResult(Activity.java:2749)
W/System.err( 2497):    at org.kde.necessitas.origo.QtActivity$4.onClick(QtActivity.java:266)
W/System.err( 2497):    at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)
W/System.err( 2497):    at android.os.Handler.dispatchMessage(Handler.java:99)
W/System.err( 2497):    at android.os.Looper.loop(Looper.java:123)
W/System.err( 2497):    at android.app.ActivityThread.main(ActivityThread.java:4363)
W/System.err( 2497):    at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2497):    at java.lang.reflect.Method.invoke(Method.java:521)
W/System.err( 2497):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
W/System.err( 2497):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
W/System.err( 2497):    at dalvik.system.NativeStart.main(Native Method)

So I can't run my program. It compiles otherwise. From what I've seen on the Internet, Ministro is a service for deploying the shared Qt libraries needed by Qt applications on Android.

So why am I getting this error (on a freshly installed Necessitas+empty Android project)? And what do I do to make my program run, do I need to manually install the Qt libs? From where?


回答1:


If I remember correctly, you had to use the modified Qt creator that comes with Necessitas and the first time you wanted to deploy your application to Android device, you had to take the following steps:

  1. On the left side of Qt Creator go to Projects
  2. In the projects window in the run tab of Necessitas Qt for android you have to go to Deploy configurations and click to expand details
  3. In details check Install Ministro system wide Qt shared libraries installer and select the APK you downloaded earlier (I think I got it from here http://necessitas.kde.org/necessitas/ministro.php)
  4. Just build and run your program as normally

Let me know if the following steps worked for you. I think there is yet another way, which involves ADB and command line, but for that I would have to lookup my notes, which I currently do not have with me...



来源:https://stackoverflow.com/questions/15728800/qt-necessitas-error-cant-find-ministro-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!