hi i'm new android studio , artoolkit, i'm trying install , run app artoolkit android phone.
i have imported ntfsimple android studio, nftsimple provided while downloading artoolkit
while i've connected device laptop , try debug it, shows error below.
error:(23) *** android ndk: missing local_module before including build_shared_library in c:\users\user\androidstudioprojects\nft1\nftsimple\build\intermediates\ndk\debug\android.mk . stop.
error:execution failed task ':nftsimple:compiledebugndk'.
com.android.ide.common.process.processexception: org.gradle.process.internal.execexception: process 'command 'c:\users\user\appdata\local\android\sdk\ndk-bundle\ndk-build.cmd'' finished non-zero exit value 2
this android.mk
my_local_path := $(call my-dir) local_path := $(my_local_path) # pull artoolkit build include $(clear_vars) artoolkit_dir := $(my_local_path)/../../../android artoolkit_libdir := $(call host-path, $(artoolkit_dir)/obj/local/$(target_arch_abi)) define add_artoolkit_module include $(clear_vars) local_module:=$1 local_src_files:=lib$1.a include $(prebuilt_static_library) endef artoolkit_libs := ar2 kpm util eden argsub_es armulti ar aricp jpeg arvideo local_path := $(artoolkit_libdir) $(foreach module,$(artoolkit_libs),$(eval $(call add_artoolkit_module,$(module)))) local_path := $(my_local_path) # android arvideo depends on curl. curl_dir := $(artoolkit_dir)/jni/curl curl_libdir := $(call host-path, $(curl_dir)/libs/$(target_arch_abi)) define add_curl_module include $(clear_vars) local_module:=$1 #local_src_files:=lib$1.so #include $(prebuilt_shared_library) local_src_files:=lib$1.a include $(prebuilt_static_library) endef #curl_libs := curl ssl crypto curl_libs := curl local_path := $(curl_libdir) $(foreach module,$(curl_libs),$(eval $(call add_curl_module,$(module)))) local_path := $(my_local_path) include $(clear_vars) # artoolkit libs use lots of floating point, don't compile in thumb mode. local_arm_mode := arm local_path := $(my_local_path) local_module := nftsimplenative local_src_files := nftsimple.cpp armarkernft.c trackingsub.c # make sure debug defined debug builds. (ndk defines ndebug release builds.) ifeq ($(app_optim),debug) local_cppflags += -ddebug endif local_c_includes += $(artoolkit_dir)/../include/android $(artoolkit_dir)/../include local_ldlibs += -llog -lglesv1_cm -lz local_whole_static_libraries += ar local_static_libraries += ar2 kpm util eden argsub_es armulti aricp cpufeatures jpeg arvideo #local_shared_libraries += $(curl_libs) local_static_libraries += $(curl_libs) include $(build_shared_library) $(call import-module,android/cpufeatures)
this build-shared-libraru.mk
local_build_script := build_shared_library local_makefile := $(local-makefile) $(call check-defined-local_module,$(local_build_script)) $(call check-local_module,$(local_makefile)) $(call check-local_module_filename) # building target objects := target_ $(call handle-module-filename,lib,$(target_soname_extension)) $(call handle-module-built) local_module_class := shared_library include $(build_system)/build-module.mk
you need follow documentation: http://artoolkit.org/documentation/doku.php?id=4_android:android_native
closely. shows how setup development environment , need build , how build it.
let me know if stuck.
edit:
from comment understand using windows.
keep in mind, on windows need install gitbash. git not enough! git bash can installed part of git installer. please rerun installer if did not install git bash.
the other precondition have set of following android_* , ndk environment variables:
on git bash navigate artoolkit root/android directory: <>/android
in directory find build.sh script. run script in git bash following command:
./build.sh
the build of native libraries starts. after can run build_native_examples.sh if interested in native examples well.
Comments
Post a Comment