non-numeric second argument to `wordlist' function:
用ndk编译一些c项目的时候,有时会出这个error
non-numeric second argument to `wordlist' function:
错误指向 __gmsl文件的第512行
网上有一些说法如下:
修改文件android-ndk-r8c/build/gmsl/__gmsl第512行
int_encode = $(__gmsl_tr1)$(wordlist 1,$1,$(__gmsl_input_int))
修改为
int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))
[来源于:http://stackoverflow.com/questions/10285242/openssl-using-androids-ndk-problems/10295653#10295653]
这样就可以了
不过偶总觉得这个不靠谱,后来在google官方论坛上看到另外一个解决办法
首先需要在AndroidManifest.xml里面添加sdk版本(感觉至少要设置minSdkVersion)
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.test.ndk" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8"/></manifest>
然后一般都可以了,如果出现以下error
Android NDK: Your APP_BUILD_SCRIPT points to an unknown file: /Android.mk
这个一般是环境变量的问题,可以修改下jni/Application.mk文件,添加APP_BUILD_SCRIPT 属性
LOCAL_PATH := $(call my-dir)APP_BUILD_SCRIPT := $(LOCAL_PATH)/../Android.mk