We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Cells 8.1.2 for Android - Could not find class 'com.aspose.cells.Workbook'

Hello everybody.
Today I tried to use your library Aspose.Cells in order to manage an xls file.
After downloading the last version from your website, I made a new android project with Eclipse.
I included both “aspose-cells-8.1.2.jar” and “bcprov-jdk15-146.jar” and create a button that only calls the Workbook() constructor. The problem is that, when I run my application, in LogCat I see the error:

Could not find class ‘com.aspose.cells.Workbook’, referenced from method com.example.asposetest.MainActivity.Test

After that, if I try to press the button wich calls Workbook() constructor, an exception occurs:

Process: com.example.asposetest, PID: 7121
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3830)
at android.view.View.performClick(View.java:4445)
at android.view.View$PerformClick.run(View.java:18446)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:732)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:566)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.view.View$1.onClick(View.java:3825)
… 11 more
Caused by: java.lang.NoClassDefFoundError: com/aspose/cells/Workbook
at com.example.asposetest.MainActivity.Test(MainActivity.java:32)
… 14 more
Caused by: java.lang.ClassNotFoundException: Didn’t find class “com.aspose.cells.Workbook” on path: DexPathList[[zip file “/data/app/com.example.asposetest-2.apk”],nativeLibraryDirectories=[/data/app-lib/com.example.asposetest-2, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)

Can you please help me understanding what I did wrong?
My simple project is attached to this post.


It looks Aspose.Cells for Android library jar(s) are not referenced properly, you should select Aspose.Cells for Android jars in Java build path (Order and Export), see the screen shot attached for your reference.

Let us know if you still find any issue.

Thank you.

thanks for the help. I fixed the reference as it’s in your screenshot, but now, when I try to build, I have another issue related to memory exceeded in Eclipse. The error is the following:

I tried to increase Xms and Xmx in eclipse.ini file as:

but the problem persists. Any hint?


Thanks for your posting and using Aspose.Cells for Android.

It seems to be a Heap space problem. Please increase the heap space of VM. You can try giving it some higher value. e.g “-Xmx2000m” in your Eclipse.ini file.

I changed eclipse.ini with “-Xmx2000” and now it works!
Thank you!


Thanks for your feedback and using Aspose.Cells.

It is good to know that your issue is resolved by changing the Xmx value in the Eclipse.ini. Let us know if you encounter any other issue, we will be glad to look into it and help you further.