mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
Updated Android (markdown)
parent
72f4835b44
commit
56680a2e53
@ -6,9 +6,9 @@ Ebiten game can be built for Android by using [`gomobile bind`](golang.org/x/mob
|
||||
|
||||
# How to build an Android application
|
||||
|
||||
## Create a module for mobiles
|
||||
## Create a package for mobiles
|
||||
|
||||
You need to create a module for mobiles with `github.com/hajimehoshi/ebiten/mobile` for your game. This module has exported functions to Java side.
|
||||
You need to create a package for mobiles with `github.com/hajimehoshi/ebiten/mobile` for your game. This package has exported functions to Java side.
|
||||
|
||||
For an actual example, see [`github.com/hajimehoshi/go-inovation/mobile/mobile.go`](https://github.com/hajimehoshi/go-inovation/blob/master/mobile/mobile.go).
|
||||
|
||||
@ -68,9 +68,9 @@ func UpdateTouchesOnIOS(phase int, ptr int64, x, y int) {
|
||||
}
|
||||
```
|
||||
|
||||
## Compile the module for mobile
|
||||
## Compile the package for mobile
|
||||
|
||||
Use `gomobile bind`, generate an aar file and import this to your Android Studio project as an external aar file. Here is the example command to build the module.
|
||||
Use `gomobile bind`, generate an aar file and import this to your Android Studio project as an external aar file. Here is the example command to build the package.
|
||||
|
||||
```sh
|
||||
:; gomobile bind -target android -javapkg com.example.yourgame -o /path/to/android/studio/project/mobile.aar github.com/yourname/yourgame/mobile
|
||||
|
Loading…
Reference in New Issue
Block a user