Re: [请益] 手机APP开发需要什么

楼主: enthos (影斯作业系统)   2019-07-06 18:11:29
帮日本原作者推广 ebiten。
四小时内应该能安装好,造出第一个 APK。
时间都是被下载和安装的龟速占用了。
0.
前人写的中文教学:
https://yami.io/tag/ebiten/
在 Golang 透过 Ebiten(炸虾)来制作 8-Bit 游戏!
1.
安装 git
https://gitforwindows.org/
2.
安装 GO
https://golang.org/
3.
安装 Android Studio
https://developer.android.com/studio
我是装在 c:\and
装好后 Configure -> SDK -> SDK tools
找到 NDK 勾选它, 选 apply
SDK 我是装在 c:\andsdk
NDK 在 c:\andsdk\ndk-bundle
set ANDROID_NDK_HOME=c:\andsdk\ndk-bundle
4.
安装 gomobile
https://godoc.org/golang.org/x/mobile/cmd/gomobile
go get golang.org/x/mobile/cmd/gomobile
gomobile init
5.
依照上面的中文说明取得 ebiten
set ANDROID_NDK_HOME=c:\andsdk\ndk-bundle
gomobile build -tags=example \
-target=android github.com/hajimehoshi/ebiten/examples/2048
得到 go2048.apk
安装雷电可使用:
https://imgur.com/QbC1uhd
https://github.com/hajimehoshi/ebiten/wiki/Android
https://github.com/hajimehoshi/ebiten/wiki/iOS
https://github.com/hajimehoshi/ebiten/wiki/Mobile
6.
WWW
https://github.com/hajimehoshi/ebiten/wiki/GopherJS
go get github.com/gopherjs/gopherjs
gopherjs 不能用 -tags=example,原作者有设定 example 和系统分开
所以要 copy
cd work
xcopy /s C:\Users\enthos\go\src\github.com\hajimehoshi\ebiten\examples\2048
set GOOS=linux
gopherjs build -o 2048.js main.go
notepad 2048.htm
<!DOCTYPE html>
<script src="2048.js"></script>
https://www.rejetto.com/hfs/
hfs.exe 2048.htm 2048.js
hfs 会有网址
可用 chrome 开启:
https://imgur.com/w5for3v
7.
PC 原版
go run -tags=example github.com/hajimehoshi/ebiten/examples/2048
https://imgur.com/zhfWiL4
作者: benedict76 (ben)   2019-07-06 23:51:00
这个是?看不太懂
楼主: enthos (影斯作业系统)   2019-07-07 00:46:00
使用 golang 开发时,运用 gomobile 的步骤

Links booklink

Contact Us: admin [ a t ] ucptt.com