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

3

我正在尝试使用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个回答

8

对于Android平台,您不需要包含gdx-freetype-natives.jar文件。该文件只需用于主项目。在Android平台上,您只需要使用gdx-freetype.jar文件和arm文件夹中的两个.so文件。这些.so文件是Android平台所需的本地文件。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接