Apache POI problem

KinfeyKinfey CNInsider, University ✭✭

I use apache poi to my monodroid . first I use binding library to bind POI jar . And then i add it to my android application. I build it ,it can not run .

It give me a report .

/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Tool exited with code: 3. Output: warning: Ignoring InnerClasses attribute for an anonymous inner class
(org.apache.commons.logging.LogFactory$1) that doesn't come with an
associated EnclosingMethod attribute. This class was probably produced by a
compiler that did not target the modern .class file format. The recommended
solution is to recompile the class from source, using an up-to-date compiler
and without specifying any "-target" type options. The consequence of ignoring
this warning is that reflective operations on this class will incorrectly
indicate that it is not an inner class.

I find some search in Google . It tells me that it is a debug.keystore problem . But I repair it , It can not run.

Can you help me ? I attach my code .

Posts

  • KinfeyKinfey CNInsider, University ✭✭

    I found that it can run in Windows Platform . But not can not run in MAC platform

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai
    edited May 2013

    I think you attached the wrong project - this example you posted is a Xamarin.iOS project and it doesn't contain anything POI type binaries.

    Could you attache the logcat output you're getting from your device when you run the app? Also, are you using the emulator or a proper device.

  • KinfeyKinfey CNInsider, University ✭✭

    Sorry I attached a wrong file .Can you see it again ? Thx for your help!

  • TomOpgenorthTomOpgenorth CAXamarin Team Xamurai
    edited May 2013

    If you look at the build output for this solution you'll notice the following at the end:

    UNEXPECTED TOP-LEVEL ERROR:
    java.lang.OutOfMemoryError: Java heap space
        at com.android.dx.ssa.SsaBasicBlock.getRopLabelSuccessorList(SsaBasicBlock.java:393)
        at com.android.dx.ssa.back.SsaToRop.convertBasicBlock(SsaToRop.java:299)
        at com.android.dx.ssa.back.SsaToRop.convertBasicBlocks(SsaToRop.java:260)
        at com.android.dx.ssa.back.SsaToRop.convert(SsaToRop.java:124)
        at com.android.dx.ssa.back.SsaToRop.convertToRopMethod(SsaToRop.java:70)
        at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:102)
        at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:73)
        at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:273)
        at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134)
        at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87)
        at com.android.dx.command.dexer.Main.processClass(Main.java:487)
        at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459)
        at com.android.dx.command.dexer.Main.access$400(Main.java:67)
        at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398)
        at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:245)
        at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:131)
        at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109)
        at com.android.dx.command.dexer.Main.processOne(Main.java:422)
        at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333)
        at com.android.dx.command.dexer.Main.run(Main.java:209)
        at com.android.dx.command.dexer.Main.main(Main.java:174)
        at com.android.dx.command.Main.main(Main.java:91)
    

    So it seems the problem is that Java is running out of heap space when compiling the projects.

    I hand-editing the .csproj files for each project in the solution and added the following to it:

    <PropertyGroup>
        <JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
    </PropertyGroup>
    

    Now things compile.

  • ChrisHonselaarChrisHonselaar NLBeta ✭✭✭
    edited June 2013

    kinfey.lo: did you ever get anywhere with the binding? More people have a need for this. The last project you attached doe snot have a central EmbeddedJar/InputJar, so does not acutally get us an entry point into the SDK. When the central poi jar is set to EmbeddedJar, 33 errors and 447 warnings pop up ;)

    I did not actually run into the heap space issue (VS2012, Xamdroid 4.6.8).

Sign In or Register to comment.