First try to build the app with mvn client:build
and solve the problems along the way. If it works, mvn client:run
will run the desktop version of the dummy app. If you run "Dummy App" you will see a window with the title "Hello, Gluon Mobile!", a picture of this weird Java mascot, the Duke, and a button with a magnifying glass icon. Clicking on it does not really let you search for anything, however, but will print "log something with Scala" to the console. In future, if you change something in the code that does not touch Android, and just want to check quickly the results on the desktop, you can do that with mvn javafx:run
. It will compile and run the app but won't build the native image.
When that works, you can try to compile an Android APK:
mvn -Pandroid client:build client:package
This again may at first produce a list of errors. Be brave. When it finishes with success, in target/client/aarch64-android/gvm
you will find the compiled app:Scala 2.13 on Android.apk
. Connect your Android phone to the computer with an USB cable, give the computer permission to send files to the phone, and type adb devices
to check if your phone is recognized. It should display something like this in the console:
> adb devices
List of devices attached
16b3a5c8 device
Then, adb install Scala 2.13 on Android.apk
should install the app on the phone and a moment later you should be able to see it on your phone's main screen. When you click on its icon it should open approximately the same screen as its desktop version.
Installation might not work for a number of reasons, one of the most popular being that your Android simply does not allow installing apps this way. Go to Settings, find "Developers options", and there enable "USB debugging" and "Install via USB". If you can't find "Developers options" anyway then it might mean you need to do something funny to make it appear, like tapping the field with your Android OS version number ten times.
If everything works and you see the dummy app's screen on your phone, type adb logcat | grep GraalCompiled
to see the log output of the dummy app. Now if you click on the button with the magnifying glass icon, you should see "log something from Scala" printed to the console. (I'm sure there are plugins for that for IntelliJ or maybe even VS Code - after all, there is one for Android Studio)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4