I built FAT APK from hello-gl2 example from NDK examples. It has 2 folders armeabi and armeabi-v7a
I added following method to it
JNIEXPORT jstring JNICALL Java_com_android_gl2jni_GL2JNILib_status(JNIEnv * env, jobject obj)
{
const char * result = "Hop";
#ifdef __ARM__
result = "__ARM__";
#endif
#ifdef __ARM_ARCH_5TE__
result = "__ARM_ARCH_5TE__";
#endif
#ifdef __ARM_ARCH_7A__
result = "__ARM_ARCH_7A__";
#endif
return env->NewStringUTF(result);
}
When app runs it calls that method and shows returned value in popup dialog.
When I run app on device with ARMv7 CPU I get __ARM_ARCH_5TE__
message instead of __ARM_ARCH_7A__
Then I delete armeabi
folder in APK and re-install APK. I see __ARM_ARCH_7A__
message
If I compile armeabi-v7a
only APK then I see __ARM_ARCH_7A__
and it does not work on ARMv6 device.
I wish to compile FAT APK that will run armeabi-v7a
lib on ARMv7 CPU and armeabi
on ARMv6 CPU.
What I am doing wrong or missing to do?