将libGdx freetype库添加到Android项目时出错

时间:2012-12-05 12:49:11

标签: java libgdx freetype

我正在尝试使用LibGDX附带的libgdx-freetype库。对于桌面,我只是将libgdx-freetype.jarlibgdx-natives.jar添加到主项目的/libs文件夹中(并添加到构建路径中),它就可以了。但是,在尝试将相同的库添加到/libs文件夹并将libgdx-freetype.so文件添加到/libs/armeabi/libs/armeabi-v7a文件夹时,我收到了构建错误:

Description Resource    Path    Location    Type
Native libraries detected in 'gdx-freetype-natives.jar'. See console for more information.  
SlotMachine-android     Unknown Android Packaging Problem

在Eclipse控制台中我有:

[2012-12-05 17:38:04 - SlotMachine-android] The library 'gdx-freetype-natives.jar' contains native libraries that will not run on the device.
[2012-12-05 17:38:04 - SlotMachine-android] The following libraries were found:
[2012-12-05 17:38:04 - SlotMachine-android]  - libgdx-freetype.so
[2012-12-05 17:38:04 - SlotMachine-android]  - libgdx-freetype64.so

有人可以指出我做错了吗?

1 个答案:

答案 0 :(得分:8)

对于Android,您不希望包含gdx-freetype-natives.jar。这仅适用于您的主要项目。在Android上,您只需要gdx-freetype.jar和arm文件夹中的两个.so文件。 .so文件是Android的原生文件。