Android Excel Creation


#1

Hi,

Android Studio 3.0.1 , SDK : 26
Version : aspose-cells-17.5.jar

When i create (new Workbook), i get error;

Fatal Exception: java.lang.ExceptionInInitializerError
at com.aspose.cells.a.c.zx.b(Unknown Source)
at com.aspose.cells.c.a.f.za.a(Unknown Source)
at com.aspose.cells.a.c.zaa.a(Unknown Source)
at com.aspose.cells.a.d.zax.b(Unknown Source)
at com.aspose.cells.a.d.zax.a(Unknown Source)
at com.aspose.cells.a.d.zax.b(Unknown Source)
at com.aspose.cells.a.d.zaw.b(Unknown Source)
at com.aspose.cells.a.d.zgo.a(Unknown Source)
at com.aspose.cells.a.c.zn.a(Unknown Source)
at com.aspose.cells.WorksheetCollection.V(Unknown Source)
at com.aspose.cells.WorksheetCollection.(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at ************.FileShowActivity$1.run(FileShowActivity.java:329)
at java.lang.Thread.run(Thread.java:762)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method ‘java.lang.String java.lang.Package.getName()’ on a null object reference
at com.aspose.cells.a.c.zx.(Unknown Source)
at com.aspose.cells.a.c.zx.b(Unknown Source)
at com.aspose.cells.c.a.f.za.a(Unknown Source)
at com.aspose.cells.a.c.zaa.a(Unknown Source)
at com.aspose.cells.a.d.zax.b(Unknown Source)
at com.aspose.cells.a.d.zax.a(Unknown Source)
at com.aspose.cells.a.d.zax.b(Unknown Source)
at com.aspose.cells.a.d.zaw.b(Unknown Source)
at com.aspose.cells.a.d.zgo.a(Unknown Source)
at com.aspose.cells.a.c.zn.a(Unknown Source)
at com.aspose.cells.WorksheetCollection.V(Unknown Source)
at com.aspose.cells.WorksheetCollection.(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at *********.FileShowActivity$1.run(FileShowActivity.java:329)
at java.lang.Thread.run(Thread.java:762)


#2

@netas,

Thanks for the details.

Do you use Aspsoe.Cells for Android via Java, make sure you are using the right (Android) library jars. Please see the document and follow the guidelines on how to setup Aspose.Cells for Android via Java in Android Studio IDE for your reference:
https://docs.aspose.com/display/cellsjava/Aspose.Cells+for+Android+via+Java+Installation#Aspose.CellsforAndroidviaJavaInstallation-HowtouseAspose.CellsforAndroidviaJava

Let us know if you still find any issue.


#3

No problem when compiling in DEBUG mode I get an error (ExceptionInInitializerError) when compiling in RELEASE mode, i think it’s permission problem ?


#4

@netas,

Yes, your issue can be related to configuration or rights issue on your end. Anyways, we will also evaluate your issue further on our end.


#5

I changed configuration gradle, like that;

implementation fileTree(include: [’*.jar’], dir: ‘libs’)
and i also added.
implementation files(‘libs/aspose-cells-17.12.jar’)

solved, thanks.


#6

@netas,

Good to know that you have sorted it out now. Feel free to write us back if you have further comments or questions, we will be happy to assist you soon.