Free Support Forum - aspose.com

Aspose.Slide pdf conversion crashing on android 4.4


#1

Hi everyone,
I was trying Aspose.Slides for android via java for pdf conversion on android 4.4 but it is crashing with error

aspose slides java.lang.noclassdeffounderror: android.util.sizef

since SizeF was introduced in api level 21 it is crashing is there a way so that I can use this I would love to buy the product if my problem is solved any help on the same will be appreciated.


#2

@Digvijayrajat,

Can you please share source file along with sample application to reproduce issue. Also please share complete environment details with us so that we may help you out.


#3

Hi @Adnan.Ahmad thanks for replying, please find the sample application a source file in the following drive link you can install the app in an environment suggested below

Environment for testing

  1. android os 4.4 (KitKat API 19)

  2. ram could be 1 GB or as per availability as this issue is related to android version

How to use the sample app

  1. please download some ppt and pptx files in your phone
  2. Run sample app where you need to enter the path of the ppt file
  3. click the convert button

notes - source code is attached in the same zip.

Drive Link

sample code and app


#4

@Digvijayrajat,

I have observed the information shared and request you to please visit following documentation link for installation of Aspose.Slides for Android via Java on your end. The sample application works well and generate the output.

https://docs.aspose.com/display/slidesjava/Install+Aspose.Slides+for+Android+via+Java


#5

Hi @mudassir.fayyaz thanks for the quick response but are u sure that it works on android 4.4 (KitKat) and my objective is ppt to pdf conversion not creation of presentations.


#6

@Digvijayrajat,

The API is supported on Android platforms and the suggested steps may help you in setting up environment and configuring Jar file in your application.


#7

@mudassir.fayyaz t is still crashing please see the logs, we want to close this quickly If you help me resolve this we can go ahed for purchase

03-28 19:57:27.475 2321-2321/com.jebalialaeddine.android.converttopdf_aspose E/AndroidRuntime: *** FATAL EXCEPTION TIME : 432.24323
03-28 19:57:27.485 2321-2321/com.jebalialaeddine.android.converttopdf_aspose E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.jebalialaeddine.android.converttopdf_aspose, PID: 2321
    java.lang.NoClassDefFoundError: android.util.SizeF
        at com.aspose.slides.ms.backend.android.System.Drawing.break.if(Unknown Source)
        at com.aspose.slides.ms.backend.android.System.Drawing.break.do(Unknown Source)
        at com.aspose.slides.internal.ey.super.do(Unknown Source)
        at com.aspose.slides.SlideSize.getSize(Unknown Source)
        at com.aspose.slides.abi.do(Unknown Source)
        at com.aspose.slides.abi.do(Unknown Source)
        at com.aspose.slides.Presentation.do(Unknown Source)
        at com.aspose.slides.Presentation.save(Unknown Source)
        at com.jebalialaeddine.android.converttopdf_aspose.MainActivity.convertFile(MainActivity.java:29)
        at com.jebalialaeddine.android.converttopdf_aspose.MainActivity.access$000(MainActivity.java:18)
        at com.jebalialaeddine.android.converttopdf_aspose.MainActivity$2.onClick(MainActivity.java:73)
        at android.view.View.performClick(View.java:4438)
        at android.view.View$PerformClick.run(View.java:18422)
        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:5017)
        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:816)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:632)
        at dalvik.system.NativeStart.main(Native Method)

You can find the source code here

sample source


#8

@Digvijayrajat,

I have observed the stack trace shared by you and following exception line doesn’t seems to be related with Aspose.Slides that is in fact cause of issue. Moreover, in your project, I have observed that you have used Aspose.Slides for Java 18.12. Can you please try using latest Aspose.Slides for Java 19.2 on your end as well.


#9

@mudassir.fayyaz If you can see the sample code which I shared with you previously It had 19.2 that also had the same issue

If you see the stack trace you can see this
java.lang.NoClassDefFoundError: android.util.SizeF

This method aspose slides is using android.util.SizeF` method while converting ppt to pdf which is introduced in API 21 I am usiing Kitkat android 19 this is not supported there I hope it’s clear now


#10

@Digvijayrajat,

Thank you for the elaboration. It seems to be a missing support in Aspose.Slides for Android. An issue with ID SLIDESANDROID-154 has been created in our issue tracking system to provide the requested support. This thread has been linked with the issue so that you may be notified once the support will be available.


#11

@mudassir.fayyaz please look into It as we want to buy and close it as soon as possible if this is resolved quickly because my team is already looking for alternatives and I’m holding them so it is difficult for me to hold them for longer as It already took approximately a month to create a Ticket so please see what can be done so that we can buy Aspose Total as it’s a priority for us to close it.


#12

@Digvijayrajat,

We have internally observed the requirements and this is new implementation required for KitKat 19. The issue is likely to get resolved in upcoming Aspose.Slides for Android via Java 19.4. We request for your patience till the time the issue gets resolved.