GithubHelp home page GithubHelp logo

makingthematrix / scalaonandroid Goto Github PK

View Code? Open in Web Editor NEW
168.0 10.0 9.0 1010 KB

A tutorial and examples of how to write Android apps in Scala 2.13 and Scala 3.

License: GNU General Public License v3.0

Scala 91.66% CSS 4.90% Shell 0.18% HTML 3.26%
android scala graalvm gluon javafx

scalaonandroid's People

Contributors

makingthematrix avatar rleibman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scalaonandroid's Issues

Add FXGL simple example

Hi @makingthematrix

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.

Failed to extract native libraries

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!

trying to follow the instructions

https://github.com/makingthematrix/scalaonandroid/wiki/How-to-compile-and-run-an-example

  1. 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?

other processor

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.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.