We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Problem with android build when aspose.cells jar is added

I have downloaded the latest version of aspose.cells and extracted the download. In the libs folder are two files:


aspose-cells-8.5.0.jar
aspose-cells-8.5.0-libs.apk

(tried importing just the jar file as well as both files to my project libs folder )

My dependencies in my build.gradle file are below

dependencies {
compile ‘com.android.support:appcompat-v7:22.2.0’
compile files(‘libs/activation.jar’)
compile files(‘libs/additionnal.jar’)
compile files(‘libs/mail.jar’)
compile files(‘libs/aspose-cells-8.5.0.jar’)
}
when I sync my project with gradle files the build is successful, but when I try running the project I get the following 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.8.0_40\bin\java.exe’’ finished with non-zero exit value 3

I know the problem lies within the aspose.cells jar import because when I remove it and comment out any calls to the library, my project runs successfully. I’ve tried researching this error and some say it is an SDK version error. Does aspose.cells only work for earlier SDK versions? Below is my full build.gradle file. Please Help!

apply plugin: 'com.android.application’

android {
compileSdkVersion 21
buildToolsVersion “21.1.2”

defaultConfig {
applicationId “applicationId”
minSdkVersion 17
targetSdkVersion 21
versionCode 1
versionName “1.0”
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(‘proguard-android.txt’), ‘proguard-rules.pro’
}
debug{
debuggable true
}
}
}

dependencies {
compile ‘com.android.support:appcompat-v7:22.2.0’
compile files(‘libs/activation.jar’)
compile files(‘libs/additionnal.jar’)
compile files(‘libs/mail.jar’)
compile files(‘libs/aspose-cells-8.5.0.jar’)
}






Hi,


Thanks for providing us some details.

It looks like an issue with locating Aspose.Cells jars in your project of android studio. To evaluate your issue on your end, could you please try to create a simple new project in which you import only aspose-cells-8.5.0.jar(s) if it works fine. If the problem still exists, please share the whole exception stack trace and the whole project with us, we will check it soon.

By the way, we compile the Aspose.Cells for Android lib with android 4.0, so, it should work fine with android 4.0 and higher versions. Also, generally we use eclipse (ADT) to test and evaluate Aspose.Cells for Android component.

Thank you.