我
在https://github.com/miniclassic/freakingmath
有一个基于 Libgdx 的开源游戏
,名为 Freaking Math Open Source。这是令人上瘾的,有趣的游戏,并支持多种平台形式。在安卓上没问题。但是当我通过 Robovm 在 ios 设备上编译和运行时,我得到了带有 facebook 共享功能的“Noclassdeffounderror DataBufferByte 异常”。它截取屏幕截图,然后在 Facebook 墙上分享。这是功能:
public static void saveScreenshot(File file, byte[] pixels, int width, int height, boolean hasAlpha) throws IOException {
DataBufferByte dataBuffer = new DataBufferByte(pixels, pixels.length);
PixelInterleavedSampleModel sampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, width, height, 4, 4 * width, getOffsets(hasAlpha));
WritableRaster raster = Raster.createWritableRaster(sampleModel, dataBuffer, new Point(0, 0));
BufferedImage img = new BufferedImage(getColorModel(hasAlpha), raster, false, null);
ImageIO.write(img, "png", file);
}
谁能帮我解决??非常感谢你!