Getting some error

10-23 16:19:14.658: E/AndroidRuntime(5639): java.lang.NoClassDefFoundError: asposewobfuscated.zzJT

Hi Hitesh,


Thank you for contacting support. Please provide us some other details of the error message, e.g. sample code and source document. So that we could reproduce this error message on our side too.

I have got the same error.
Here is the stack trace.

java.lang.NoClassDefFoundError: asposewobfuscated.zzJT
at com.aspose.words.FontInfoCollection.clear(Unknown Source)
at com.aspose.words.FontInfoCollection.(Unknown Source)
at com.aspose.words.DocumentBase.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.example.test.CheckList.saveDOCX_Aspose(CheckList.java:1506)
at com.example.test.CheckList.saveDOCX(CheckList.java:1179)
at com.example.test.MainActivity.saveDOCX(MainActivity.java:2430)
at com.example.test.MainActivity$7$1.doInBackground(MainActivity.java:1441)
at com.example.test.MainActivity$7$1.doInBackground(MainActivity.java:1394)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)

My source code is from your sample HelloWorld.java.
The exception occurs when new Document() is called.

// Create a blank document.
Document doc = new Document();
// DocumentBuilder provides members to easily add content to a document.
DocumentBuilder builder = new DocumentBuilder(doc);
// Write a new paragraph in the document with the text "Hello World!"
builder.writeln(“Hello World!”);
// Save the document in DOCX format. The format to save as is inferred from the extension of the file name.
// Aspose.Words supports saving any document in many more formats.
doc.save(dataDir+“HelloWorld Out.docx”);



My Android Studio project uses the following jar file in libs folder.
aspose-words-1.12-android-jdk16.jar


What can I do to solve the problem?


Hi there,


Thanks for your inquiry. We have now divided the library into following two archives. For example:

  • aspose-words-1.12-android-jdk15.jar: The first one includes public API and its auxiliary methods.
  • aspose-words-1.12-libs-android-jdk15.apk: The second one includes third party jars, basic classes and resources.

To include Aspose.Words for Android into the project you should place “aspose-words-1.12-android-jdk15.jar” in the folder “libs” of your project, and the archive “aspose-words-1.12-libs-android-jdk15.apk” into the folder “assets". After that you need to indicate in “AndroidManifest.xml” file that you are going to use AsposeWords application as the basic one. Please see the following markup:
<application
android:allowBackup=“true”
android:icon="@drawable/ic_launcher"
android:name=“com.aspose.words.AsposeWordsApplication”
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity

Please let us know if you have any more queries.

Thank you for letting me know how to use the apk in Android project.

In my project, I already had an Application class that holds some “global values”.
Let’s say it’s name is MyApplication.java.

Since Android accepts only one application in the manifest, I could not simply change the manifest as shown above.
Instead, my manifest is still something like below.

<application
android:allowBackup=“true”
android:icon="@drawable/ic_launcher"
android:name=“com.example.test.MyApplication”
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity

To make Aspose Word work in my project, I changed MyApplication.java.

The class was defined as …

public class
MyApplication extends Application

Now, I changed it as shown below …

public class MyApplication extends AsposeWordsApplication

By letting MyApplication inherit from AsposeWordsApplication, I could keep using the existing source code and successfully save doxc files.

Thank you!






Hi there,

Thanks for sharing the detail. We always appreciate positive feedback from our customers. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.