xlab/android-go

internal/callfn error when running main.go file

TechComSpot opened this issue · 6 comments

Hi, @xlab

I try go run main.go but got this error:

screenshot at 2018-06-21 09-38-02

Please help.

xlab commented

You cannot run android apps on desktop, should deploy them on device using commands from Makefile

Hi, @xlab.

Unfortunatelly I don't have android device but was hopping to generate apk file to run somewhere in cloud, VM etc.

xlab commented

@r3mb00 the makefile generates an APK artefact. You then decide what to do with it. You don't need a device to compile the app, however go run is not enough.

@xlab I did ANDROID_HOME=path/to/sdk ../build-android.sh" to build an APK ready for deployment from Minimal Go app page but couldn't find apk.

I search all directories and subdirectories but found nothing did I do something wrong ?

You have to get the android sdk and ndk. The easiest way to do that is installing Android studio and getting it through the package manager in Android studio. It also comes with Android emulators you can test the built apk out on.

@Noofbiz thank you for the help.

I installed Android Studio and NDK with the SDK Manager sd you adviced:
screenshot at 2018-06-28 10-36-44
screenshot at 2018-06-28 10-36-55
screenshot at 2018-06-28 11-07-44
screenshot at 2018-06-28 13-08-42
screenshot at 2018-06-28 13-08-55
screenshot at 2018-06-28 13-09-11
screenshot at 2018-06-28 13-09-27
screenshot at 2018-06-28 13-09-36
screenshot at 2018-06-28 13-09-48
screenshot at 2018-06-28 13-09-53
screenshot at 2018-06-28 14-05-08
screenshot at 2018-06-28 14-05-16

@Noofbiz @xlab what next should I do?
Can you help please ?