Imagination PowerVR SDK Blog

Can't build projects for Android



I’ve installed the sdk using Android Sdk manager but every time I try building the jni sources I get the following error:

Invalid attribute name:


[…]/android-ndk-r8d/build/gmsl/__gmsl:512: *** non-numeric second argument to `wordlist’ function: ‘’. Stop.

This happens with every sample project.

i tried editing the AndroidManifest.xml manifest file to specify the min sdk version, but that didn’t help. How should I fix this?



It looks to me like a problem with your NDK not picking up properly the android:minSdkVersion property from your AndroidManifest.xml.

To work around that issue chenge the line 512 of the file /android-ndk-r8d/build/gmsl/__gmsl to:

int_encode = $(__gmsl_tr1)$(wordlist 1,$(words $1),$(__gmsl_input_int))




Thank you, that fixed this error.

However now I have a IMG_SDK_HOME needs to be defined as an environment variable pointing to the PowerVR SDK add-on directory but I have two folders with Power VR opengl es 1 & 2 add-ons. How should I set the variable value?



Short answer: Point it to SDK you are building the sample from.

If you don’t want to bother to change that variable every time you change the API there is the option of copying the /build, /tools and /shell from one SDK to the other and point to the later one (plenty of files will be overwritten but there is no problem because those are the same). This will work because we designed our SDK to be crossplatform :slight_smile:

For example you can have you IMG_SDK_HOME pointing to the ogles2 SDK and then manually copy the ogles1 /builds, /shell and /tools to the ogles2 SDK directory.