Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
Qt Creator 4.14.2
Description
Synopsis
Qt Creator android plugin is using adb to start remote process on android device/emulator. To do so it invokes following sequence(AndroidRunnerWorker::asyncStartHelper())
adb shell am start <extra_args> <intent_name>
In case of sample project(attached) where there is no activity, but only service the sequence shall be:
adb shell am startservice <extra_args> <intent_name>
Otherwise the only thing that user sees is in Qt Creator is:
Exception occurred while executing: java.lang.IllegalArgumentException: Bad component name: org.qtproject.example.service/ at android.content.Intent.parseCommandArgs(Intent.java:7254) at com.android.server.am.ActivityManagerShellCommand.makeIntent(ActivityManagerShellCommand.java:317) at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:409) at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:172) at android.os.ShellCommand.exec(ShellCommand.java:104) at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:9766) at android.os.Binder.shellCommand(Binder.java:881) at android.os.Binder.onTransact(Binder.java:765) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:4500) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2738) at android.os.Binder.execTransactInternal(Binder.java:1021) at android.os.Binder.execTransact(Binder.java:994) Failed to start the activity. "org.qtproject.example.service" died.
Workaround
Use adb console directly
Expected behavior
Android run settings widget allows to select whether target application is activity (default) or service based intent.