Hi Hitesh,
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,
- 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.
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.
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.