I’d like to avoid Android Studio (size, bloated, etc), and it’s possible to build Android projects just with the command line (actually its all we use on every platform).
I remember in 2015 with ant scripts this was feasible. Wondering if anyone has tests, pointers, directions, offroad charts… Something like what
@kkirbatski suggests was possible in earlier versions of of-android, circa 14, 15:
I too was wondering how to do this. I ended up having to do a few things to get this to work.
There is a file called
paths.make located here:
Update the line where is says
NDK_ROOT= to point to your NDK root. Pretty self explanatory.
Then, you’ll need to run
make with a
PLATFORM_OS variable of
This will compile the
c/c++ code to a shared object file and will also create a
jni folder with
After that, I actually had to move the
src folder to a temporary location and rename
src. I thought I could pass in a variable to
ant to change where the
java sources were found, but due to library dependencies this ended up not working, which resulted in me just renaming the folder.
Now you’ll need to run
android update project -p . so your
sdk.dir is passed in properly. You’ll also have to do this for any project dependencies. In my case I also had to run it in
This message is a bump of
How to command-line build of_v0.10.1_android_release and Linux android command-line build (ant? make?) - #2 by nunos, mods please excuse if this is considered littering.