Using Aspose.Cells for Android in Android Studio 1.0

Hi,
I am trying to use aspose.cells for Android, my IDE is Android Studio 1.0.0.
The project is working fine in the IDE Eclipse but when I try to use the .jar of Aspose on Android Studio doesn’t work.

This is the error:
Failed to complete Gradle execution.
Local path doesn’t exist.

Thanks,

Eliana

INFO:
Path .XLS = Environment.getExternalStorageDirectory().getPath() + “/ot_files/db/formula.xls”

Hi,

Thanks for your posting and using Aspose.Cells.

Earlier we found the issue with Android Studio and were not able to fix it. So we advise you to use Eclipse for the development.

Please see this post for your reference.

( OutOfMemoryError in Android Studio )

Hi, thanks for your reply but we need to use all libraries for Android Studio because we are migrating to this IDE. Another point is that Android has released its stable version and they won’t support Eclipse anymore:


“If you have been using Eclipse with ADT, be aware that Android Studio is now the official IDE
for Android, so you should migrate to Android Studio to receive all the
latest IDE updates.” - ADT Plugin (UNSUPPORTED)  |  Android Studio  |  Android Developers

Thanks,

Eliana




Hi Eliana,

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

We support a JAR file which should work well with any Android Development IDE. We think, you may need more knowledge about Android Studio, perhaps this issue needs some settings.

We will also check this issue at our end and update you asap.

Hi,


We have evaluated your issue further.
Well, for your issue, it
seems there is some problem when accessing the local path of template file. Could you try to access the file by FileInputStream to make sure that you can
access the file correctly. If you can access the file without reference to Aspose.Cells(read the binary data from the file), then you should be able to build
ByteArrayInputStream from the binary data and use the ByteArrayInputStream to
construct Workbook object.

Thank you.

Hi, I found a solution, I increased heap size ( http://stackoverflow.com/a/16634014 ). I created a new environment variable named _JAVA_OPTIONS, set it to -Xms256m -Xmx2048m.



Many Thanks for your help.

Regards,
Eliana

Hi Eliana,

That’s great and thanks for sharing the solution with us. It will be helpful for other Aspose.Cells and Android Studio users.

Hi,

Thanks for using Aspose.Cells for Android.

FYI: Please set the following in build.gradle in app model. It will work OK.

dexOptions {
javaMaxHeapSize “4g”
}


Post References:
( Not able to integrate aspose.pdf for android in android studio )
( How to display Excel file in android using aspose Cells lib )


Hi, thanks for the information, I’ll try that solution.


Regards,

Eliana