Getting this error when attempting to initialize a DocumentBuilder.
I’ve included the jar in my Android project, and have confirmed that it is found and referenced. Do I also need to include the apk as an apklib?
Note that your getting started docs, or at least the ones I’ve read, only mention a jar. There is an apk alongside the jar in the lib/ directory but the docs make no mention of including this in my project. In any case, I’ve placed it in my libs/ folder alongside the jar but it isn’t picked up. I’m using SBT and Scala, so it’s possible that my plugin isn’t picking up the apk as the docs claim it should, but I’d like to make sure this is what I need to do before continuing down this path.
Thanks.
Hi Nolan,
- 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.
Cool, thanks. So, to be clear, I’d include the apk file in something like src/main/res/assets, and the build/packaging process should handle the rest? I’m using the Gradle-based build system so am wondering if I need to do anything in particular, if the apks nee to be merged somehow, etc.
Thanks.
Apologies for the quick series of replies. Assuming I’m using my own application class to set up application-wide features, ACCRA in this case, how would I go about retaining that while using your own context? Are there any facilities for augmenting the aspose context with my own?
Thanks.
Hi Nolan,
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);
// load AW manually AsposeWordsApplication awapp = new AsposeWordsApplication();
// this context AW uses to find assets/ folder which contains the second part of the library.
awapp.loadLibs(getApplicationContext());
if (!AWUtils.checkIfAWSetUpCorrectly())
throw new IllegalStateException();
...
}
Thanks, I can’t seem to find the AWUtils class however. Which package is it in? Doesn’t appear to be in com.aspose.words, unless my setup is wrong, and I don’t see it in the javadoc.
try {
Class.forName("com.aspose.words.Document");
return true;
} catch (ClassNotFoundException e) {
e.printStackTrace();
return false;
}
}
The issues you have found earlier (filed as WORDSANDROID-182) have been fixed in this Aspose.Words for Android 17.2.0 update.