Hi every one.
I’m a android developer. I want to check Aspose.Words component to decide use it on our project, but I can’t build it on Android Studio. Currently Almost android developer use Android Studio to development but there aren’t any tutorial to use Aspose library with Android Studio.
I build DocumentViewer example then has error occur :
Error:(81, 21) error: cannot access zzF4
class file for asposewobfuscated.zzF4 not found
I also checked this document
https://docs.aspose.com/words/java/install-aspose-words-for-android-via-java/
Please help ( sorry about my pool english)
Hi Hùng,
Thanks for your inquiry. Please download this Android Studio test project
. After that please do the following steps to generate .jar from .apk:
- Extract attached “dex2jar.zip” to "“C:\dex2jar”
- Go to “~\HelloWorld\app\src\main\assets” folder in “HelloWorld” project and copy “aspose-words-1.12-libs-android-jdk16.apk” to “C:\dex2jar” folder
- Open “aspose-words-1.12-libs-android-jdk16.apk” with WinRar and extract “classes.dex” file to “C:\dex2jar”
- Open command prompt in Windows and enter the following commands
- C:\WINDOWS\system32>cd/
- C:>cd dex2jar
- C:\dex2jar>d2j-dex2jar.bat c:\dex2jar\classes.dex
- dex2jar c:\dex2jar\classes.dex -> .\classes-dex2jar.jar
- C:\dex2jar>
- Now we have “classes-dex2jar.jar” which contains all the obfuscated classes
- Copy this .jar to “~\HelloWorld\app\libs” folder of “HelloWorld” project
- Now in Android Studio go to “Project Structure” of “HelloWorld” project
- Under “Modules”, select “app” and go to “Dependencies” tab
- Click ‘+’ and add a file dependency for “~\HelloWorld\app\libs\classes-dex2jar.jar”
- Under “Scope” column choose “Provided” value for this .jar and click OK and “Rebuild Project”.
Hope, this helps.
Best regards,
I can build “Hello Word” project, but when I add the document viewer feature => has error:
Error:Execution failed for task ‘:app:preDexDebug’.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process ‘command ‘C:\Program Files\Java\jdk1.7.0_79\bin\java.exe’’ finished with non-zero exit value 1