xlab/android-go

Building Android-go in Android Open Source Project (AOSP)

ssmumbai07 opened this issue · 9 comments

How can we build android-go in Android Open Source Project (AOSP) for android marshmallow 6.0. Can you please help me with the steps for it. And after building Android-Go, will it generate JAR file so that other application can use this?

xlab commented

Hi! This project isn't about JARs and other Java applications, you should check out https://github.com/golang/mobile instead.

How can we build android-go in Android Open Source Project (AOSP) for android marshmallow 6.0.

I had no problems building and running apps for any Android versions between 4.4.3 and 7.0 using this package. You should adjust the scripts to use proper Android NDK paths and versions:

about paths
https://github.com/xlab/android-go/tree/master/example#prerequisites

about SDK versions
https://github.com/xlab/android-go/blob/master/example/Makefile#L2
https://github.com/xlab/android-go/blob/master/example/android/Makefile#L11-L13

Hi, Thank you for quick reply. I will go through the links.

Hi Maxim, I am getting the below error while compiling android-go,I am following as mentioned in the above links. Could you please help me with this.Sorry if it is a silly question, I am new to this.

processing android.yml ⠼[ERR] /home/user/spade_sorcecode/HDU_MARSHMALLOW/android-ndk-r14/platforms/android-23/arch-arm/usr/include/android/asset_manager.h:89:43: unexpected identifier size_t, expected parameter declaration or one of [..., _Bool, _Complex, _Noreturn, auto, char, const, double, enum, extern, float, inline, int, long, register, restrict, short, signed, static, struct, typedef, typedefname, typeof, union, unsigned, void, volatile]
make: *** [gen-android] Error 1

xlab commented

Hi Maxim, I am getting the below error while compiling android-go,

You don't have to run generation of bindings, if you really don't want to do that.

android-go package is go get-able.

The makefile you're invoking is for project maintainers https://github.com/xlab/android-go/blob/master/Makefile

android-go package is go get-able.

Is it though? I am just trying this out, but I get the following:

$ echo $GOPATH
/home/pao
$ pwd
/home/pao/src/github.com/xlab
pao@janus:~/src/github.com/xlab$ ls
closer
$ cd
$ go get github.com/xlab/android-go
package github.com/xlab/android-go: no buildable Go source files in /home/pao/src/github.com/xlab/android-go
$ go version
go version go1.6.2 linux/amd64
$ cd ~/src/github.com/xlab/android-go
$ ls
android app egl.yml example-egl gles2 gles3 gles31.yml gles.yml Makefile
android.yml egl example gles gles2.yml gles31 gles3.yml LICENSE.txt README.md

What is wrong?

xlab commented

Sorry, I meant packages in this project.

  • github.com/xlab/android-go/android — the bindings to Android NDK and helpers
  • github.com/xlab/android-go/app — the app framework (the minimal glue)

you can check all packages available in this project at
https://github.com/xlab/android-go#project-structure

And I advise you to study the example project, what its Makefile does and etc.
Maybe gomobile would be much easier to use there..

Thanks a lot. I am able to build and install.

Thanks a lot. I am able to build and install.

Hey Brother , I am also a bigginer in this field and really want to build a custom rom based on android go edition i need your help in this . will you please guild me to build this rom .
My android is having Marshmallow(6.0) os with 1gb ram and 8 gb internal storage.Arm 64

xlab commented

@Utkarsh104 any android can run go binaries, you can follow the tutorials like this:
https://github.com/golang/go/wiki/Mobile

After you build the first Android app that writes something to console, you can use this package to have better flexibility. That means it's harder to use, but more possibilities, such as custom 3D drawing surfaces.