I am trying to connect Unity with simple Java android development and I actually succeeded to get to the part where I can import unity project to android and if needed start it up.
The problem I am facing at the moment is how to pass variables back and forth between those 2 platforms. I found some tutorials and they all suggest to use Android NDK. I am new in this field and got some problems while getting it to work.
I followed this tutorial and got stuck on building the application. I have my Android.mk file but when I run make (make app=ndk-demo) it throws an exception:
"make: *** No targets specified and no makefile found. Stop."
My Android.mk file looks like:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ndk-demo
LOCAL_SRC_FILES := $(call all-subdir-java-files)
include $(BUILD_SHARED_LIBRARY)
I have 3 activities in my project, one .h and one .c files. I don’t know whether I should include them or all-subdir-java-files does it for me.
In the answer to this question I’ve described step-by-step instructions how to make a native project. Hope this help you.