GithubHelp home page GithubHelp logo

Crash when using SXSSFWorkbook: ava.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/font/FontRenderContext; about poi-on-android HOT 3 OPEN

jacky-1 avatar jacky-1 commented on June 19, 2024
Crash when using SXSSFWorkbook: ava.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/font/FontRenderContext;

from poi-on-android.

Comments (3)

centic9 avatar centic9 commented on June 19, 2024 1

I have now cherry-picked changes from LePat@d38372b onto branch https://github.com/centic9/poi-on-android/commits/add_dummy_autosize to show how such missing classes from java.awt can be added.

But as the implementation just provides dummy implementations of the methods, I did not merge it into master. The resulting autosized column widths are far off and will not be useful unless a more sophisticated solution is implemented.

If you just want to get SXSSFWorkbook to work should be able to fetch these changes from there in your fork.

It can also serve as example of how to add a more useful implementation in the future.

from poi-on-android.

centic9 avatar centic9 commented on June 19, 2024

Android does not provide the java.awt.* packages and also actively refuses if you try to add such classes, this means any part of Apache POI which uses java.awt.* stuff will currently fail this way.

I did some workaround with shading for java.awt.Color before, you can try to do the same for Dimension, see https://github.com/centic9/poi-on-android/blob/master/poishadow/build.gradle#L39 and https://github.com/centic9/poi-on-android/tree/master/poishadow/src/main/java/org/apache/poi/java/awt

from poi-on-android.

marcorei avatar marcorei commented on June 19, 2024

The same issue is triggered by calling Sheet.autoSizeColumn(Int row), this also needs the FontRenderContext.
Thanks for adding the example of how to add implementations for missing classes!

from poi-on-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.