1

I've got an open source game base on Libgdx
at https://github.com/miniclassic/freakingmath
that called Freaking Math Open Source. It's addictive,funny game and support mutilple plat form. It's ok on Android. But when i compile and run on device for ios by Robovm, i got "Noclassdeffounderror DataBufferByte exception" with facebook share function. It take screenshot then share on facebook wall. This is functon:

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);
}

Who can help me resolve it?? Thank u so much!

BergQuester
  • 6,167
  • 27
  • 39
Tung Ha
  • 61
  • 1
  • 1
    Can you include the complete backtrace from the exception? – P.T. Jun 14 '14 at 17:29
  • Are you sure that works on Android? It shouldn't. – nEx.Software Jun 14 '14 at 18:07
  • I sure about it work on Android ! @P.T: ok, i will post log soon, thank you!! – Tung Ha Jun 15 '14 at 17:04
  • Thank you, i try some other method for take screenshot in libgdx but image return is blank image. I also try call to ios screenshot method via binding robovm, but it still return blank image. So mad! Need your helppppp! – Tung Ha Jun 20 '14 at 04:54

0 Answers0