0

I want to test. my JavaFX application on Mobile. Right now I'm doing a lengthy process of making apk then send someone on WhatsApp and download on my phone and then installing it. so I google to do install and run it as we do in android studio. but I didn't find any solution. that's why I am asking questions. here. can anyone help me plz.

  • I take that you use the Client plugin to build the apk? Then see https://docs.gluonhq.com/#platforms_android_development_run – José Pereda Apr 14 '21 at 16:16
  • I Think I tried mvn -Pandroid client:install and client:run but both wasn't working. do they need any other plugin to install? like AVD in android studio. something like that which detects android connectivity. – Syed Sulaiman Apr 14 '21 at 16:19
  • 1
    See "USB debugging" in https://docs.gluonhq.com/#platforms_android_development_run. `mvn -Pandroid client:build client:package client:install client:run` should work (or goal by goal too). – José Pereda Apr 14 '21 at 16:21
  • Caused by: org.apache.maven.plugin.MojoExecutionException: Installing failed at com.gluonhq.NativeInstallMojo.execute (NativeInstallMojo.java:53) – Syed Sulaiman Apr 14 '21 at 16:26
  • You need to post the full error, the exception probably will give you the cause of the failure. – José Pereda Apr 14 '21 at 16:31
  • I think I will do send through WhatsApp apk and then install. it like I do but it's giving the black screen. It's Run Fine in windows. but why it's showing black screen? – Syed Sulaiman Apr 14 '21 at 16:38
  • Black screen means there was an exception. Using `mvn -Pandroid client:run` lets you also get the output from the process to your terminal, so you will see the error message. Else you need to use `adb logcat`. I suggest you address the install error fix. Post the stacktrace so we can help. – José Pereda Apr 14 '21 at 16:40
  • what is adb logcat and how to use it? – Syed Sulaiman Apr 14 '21 at 16:42
  • you can google it :) It will probably lead you to the same root issue, that I mentioned a few comments above: USB debugging. – José Pereda Apr 14 '21 at 16:43
  • Let us [continue this discussion in chat](https://chat.stackoverflow.com/rooms/231133/discussion-between-syed-sulaiman-and-jose-pereda). – Syed Sulaiman Apr 14 '21 at 16:44
  • so how can i use adb in mvn cmds to install and get stacktrace – Syed Sulaiman Apr 14 '21 at 17:05
  • just read carefully my comments, it is all there ;) – José Pereda Apr 14 '21 at 17:06
  • Just one question? Am Running Ubuntu Linux OS in windows virtual machine. is it possible that it may not detect any phone. connected to my system. – Syed Sulaiman Apr 14 '21 at 17:13
  • It is possible, but you should be able to find a way to enable USB debugging also with your setup. – José Pereda Apr 14 '21 at 17:15
  • I installed adb and I have usb debbing mode enabled. but adb doesn't find my phone – Syed Sulaiman Apr 14 '21 at 17:17
  • I install the apk with ADB but it's not showing me any errors. – Syed Sulaiman Apr 14 '21 at 17:43

0 Answers0