We’ve finally changed from building with ant (the ancient way) to building with gradle (the modern way). We’re now getting the following error:
.../aspose/WordsOperations.java:343: error: cannot access zzF4
Document document = new Document(stream, options);
^
class file for asposewobfuscated.zzF4 not found
I’m sure this must be related to proguard. How can we resolve this problem?
I am afraid, I was unable to reproduce this issue on my end when creating a new Gradle based Java project from scratch. I am sharing content of my simplified build.gradle file here for your reference:
The editor is now running on the B2G but it’s saying that there’s a problem with the license. I think, therefore, that the error should be posted, and that then this should be added:
Since the AsposeWordsApplication object seems to be no longer defined, we thought that the code to load the libraries may be no longer needed so we removed this code:
private final static AsposeWordsApplication wordsApplication =
new AsposeWordsApplication();
static {
Context context = ApplicationContext.getContext();
wordsApplication.loadLibs(context);
}
Now, however, it’s telling me that there’s a problem with the license so maybe removing that code was a bad idea. What do you suggest that we try next?
Please also create a standalone simplified Java/Android application (source code) that helps us to reproduce your current problem on our end and attach it here for testing. You can compress the project into ZIP format and attach the ZIP file. Please do not include Aspose.Words JAR files in it to reduce the ZIP file size. We will then start further investigation into your scenario and provide you more information.
Edit: can you please also share the stack-trace of the error/exception message that you are observing on your end?
The editor is now running on the B2G but it’s saying that there’s a problem with the license. I think, therefore, that the error should be posted, and that then this should be added:
Since the AsposeWordsApplication object seems to be no longer defined, we thought that the code to load the libraries may be no longer needed so we removed this code:
private final static AsposeWordsApplication wordsApplication =
new AsposeWordsApplication();
static {
Context context = ApplicationContext.getContext();
wordsApplication.loadLibs(context);
}
Now, however, it’s telling me that there’s a problem with the license so maybe removing that code was a bad idea. What do you suggest that we try next?
Please also create a standalone simplified Java/Android application (source code) that helps us to reproduce your current problem on our end and attach it here for testing. You can compress the project into ZIP format and attach the ZIP file. Please do not include Aspose.Words JAR files in it to reduce the ZIP file size. We will then start further investigation into your scenario and provide you more information.
Since we may well be using the wrong API, I’ll wait for your advice on that, first.
Edit: can you please also share the stack-trace of the error/exception message that you are observing on your end?
There is no backtrace. It’s a compile failure. The AsposeWordsApplication object isn’t defined.
I think, you are working on a Java Android application. If that is the case then you need to use/reference “Aspose.Words for Android via Java” API in your project. Please add following configurations to the build.gradle (see also Install Aspose.Words for Android via Java from Maven Repository).