makingthematrix / scalaonandroid Goto Github PK
View Code? Open in Web Editor NEWA tutorial and examples of how to write Android apps in Scala 2.13 and Scala 3.
License: GNU General Public License v3.0
A tutorial and examples of how to write Android apps in Scala 2.13 and Scala 3.
License: GNU General Public License v3.0
Following our quick chat on Twitter, please see a standalone example below:
Maven dep coordinates:
<dependency>
<groupId>com.github.almasb</groupId>
<artifactId>fxgl</artifactId>
<version>11.17</version>
</dependency>
Example:
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.app.GameSettings;
import com.almasb.fxgl.dsl.FXGL;
import javafx.scene.text.Text;
public class UISample extends GameApplication {
@Override
protected void initSettings(GameSettings settings) { }
@Override
protected void initUI() {
Text uiText = new Text("Hello World");
FXGL.addUINode(uiText, 100, 100);
}
public static void main(String[] args) {
launch(args);
}
}
The example, when executed, will open a 800x600 window with "Hello World" text.
Hello, amazed with Scala on Android.
Following the steps to run "hellogluon", in the last step I've got the next error:
$ adb install Scala\ 2.13\ on\ Android.apk
Performing Streamed Install
adb: failed to install target/client/aarch64-android/gvm/Scala 2.13 on Android.apk:
Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
I am on Arch linux
$ java --version
openjdk 11.0.11 2021-04-20
OpenJDK Runtime Environment GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05)
OpenJDK 64-Bit Server VM GraalVM CE 21.1.0 (build 11.0.11+8-jvmci-21.1-b05, mixed mode, sharing)
I am new at android, any idea how to approach this error?. Thank you!
https://github.com/makingthematrix/scalaonandroid/wiki/How-to-compile-and-run-an-example
- First try to build the app with mvn client:build and solve the problems along the way.
box% mvn client:build
https://pastebin.com/raw/N9eg5mFu
box% mvn -version
Apache Maven 3.6.3 (NON-CANONICAL_2019-11-27T20:26:29Z_root)
Maven home: /opt/maven
Java version: 1.8.0_282, vendor: Oracle Corporation, runtime: /usr/lib/jvm/java-8-openjdk/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.11.2-arch1-1", arch: "amd64", family: "unix"
box% which mvn
/usr/bin/mvn
I wonder if I need to "install maven in graalvm", if that makes sense?
I have a slightly older phone (oneplus one / arm32 processor). I wasn't able to figure out what config to change to build for this device. (Tried grepping for aarch64.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.