android - Getting error linker command failed with exit code in NDK -
here android.mk file
local_path := $(call my-dir) include $(clear_vars) local_module := prebuild_usb1.0 local_src_files :=$(target_arch_abi)/libusb-1.0.so include $(prebuilt_shared_library) include $(clear_vars) local_module := prebuild_ftrscanapi local_src_files := $(target_arch_abi)/libftrscanapi.so include $(prebuilt_shared_library) include $(clear_vars) local_module := prebuild_ftransisdk local_src_files := $(target_arch_abi)/libftransisdk.so include $(prebuilt_shared_library) include $(clear_vars) local_module := ftransisdkandroidjni local_cflags := -d__android_api__ local_src_files := ftransisdkandroidjni.cpp local_shared_libraries := prebuild_usb1.0 prebuild_ftrscanapi prebuild_ftransisdk include $(build_shared_library)
and application.mk looks like
app_abi=armeabi armeabi-v7a
i getting error when build apk
error:error: linker command failed exit code 1 (use -v see invocation)
and sometime studio throws warning: '__android_api__' macro redefined
here exception
execution failed task ':androidhelper:externalnativebuilddebug'. build command failed. error while executing process c:\users\waqas\appdata\local\android\sdk\ndk-bundle\ndk-build.cmd arguments {ndk_project_path=null app_build_script=d:\androidprojects\androidstudiolatestzongsourceready\posapp_av06_stc_bvs\androidhelper\src\main\jni\android.mk ndk_application_mk=d:\androidprojects\androidstudiolatestzongsourceready\posapp_av06_stc_bvs\androidhelper\src\main\jni\application.mk app_abi=mips ndk_all_abis=mips ndk_debug=1 app_platform=android-17 ndk_out=d:/androidprojects/androidstudiolatestzongsourceready/posapp_av06_stc_bvs/androidhelper/build/intermediates/ndkbuild/debug/obj ndk_libs_out=d:\androidprojects\androidstudiolatestzongsourceready\posapp_av06_stc_bvs\androidhelper\build\intermediates\ndkbuild\debug\lib d:/androidprojects/androidstudiolatestzongsourceready/posapp_av06_stc_bvs/androidhelper/build/intermediates/ndkbuild/debug/obj/local/mips/libftransisdkandroidjni.so} [mips] compile++ : ftransisdkandroidjni <= ftransisdkandroidjni.cpp in file included :333: :4:9: warning: 'android_api' macro redefined [-wmacro-redefined]
define android_api 17
^
:3:9: note: previous definition here
define android_api 1
^
1 warning generated. [mips] sharedlibrary : libftransisdkandroidjni.so d:/androidprojects/androidstudiolatestzongsourceready/posapp_av06_stc_bvs/androidhelper/build/intermediates/ndkbuild/debug/obj/local/mips/libusb-1.0.so: error adding symbols: file in wrong format clang++.exe: error: linker command failed exit code 1 (use -v see invocation) make:[d:/androidprojects/androidstudiolatestzongsourceready/posapp_av06_stc_bvs/androidhelper/build/intermediates/ndkbuild/debug/obj/local/mips/libftransisdkandroidjni.so] error 1
wiki
Comments
Post a Comment