3

我正在尝试使用 LibGDX 附带的 libgdx-freetype 库。对于桌面,我只是将libgdx-freetype.jar和添加到主项目libgdx-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

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

4

1 回答 1

8

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

于 2012-12-05T13:48:59.907 回答