我在 FMOD 示例文件夹中找到了一个名为 nativeactivity 的示例,但不幸的是它使用了一些 java 代码:
package org.fmod.nativeactivity;
public class Example extends android.app.NativeActivity
{
static
{
System.loadLibrary("fmodex");
System.loadLibrary("main");
}
}
Android.mk 看起来像这样:
LOCAL_PATH := $(call my-dir)
#
# FMOD Ex Shared Library
#
include $(CLEAR_VARS)
LOCAL_MODULE := fmodex
LOCAL_SRC_FILES := libfmodex.so
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/inc
include $(PREBUILT_SHARED_LIBRARY)
#
# Example Library
#
include $(CLEAR_VARS)
LOCAL_MODULE := main
LOCAL_SRC_FILES := main.c
LOCAL_LDLIBS := -llog -landroid
LOCAL_SHARED_LIBRARIES := fmodex
LOCAL_STATIC_LIBRARIES := android_native_app_glue
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/native_app_glue)
没有java部分可以吗?如果是这样,我需要改变什么?