java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: 65536
Closed this issue · 3 comments
Hi,
I use aa-poi-3.10-min-0.1.5.jar & aa-poi-ooxml-schemas-3.10-reduced-more-0.1.5.jar on my lib project
already try using poi-ooxml-schemas-3.10-reduced-less.jar still error
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: method ID not in [0, 0xffff]: 65536
at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:501)
at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:282)
at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:490)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:167)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:439)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:287)
at com.android.dx.command.dexer.Main.run(Main.java:230)
at com.android.dx.command.dexer.Main.main(Main.java:199)
at com.android.dx.command.Main.main(Main.java:103)
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_25\bin\java.exe'' finished with non-zero exit value 2
my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "19.1.0"
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ASL2.0'
}
compileOptions {
//sourceCompatibility JavaVersion.VERSION_1_6
//targetCompatibility JavaVersion.VERSION_1_6
}
defaultConfig {
applicationId "com.crosstechno.xxxxxx"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
//multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
//shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
/*debug {
//minifyEnabled true
//shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}*/
}
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.2'
compile project(':aFileDialog')
compile files('libs/aa-poi-3.10-min-0.1.5.jar')
compile files('libs/aa-poi-ooxml-schemas-3.10-reduced-more-0.1.5.jar')
//compile files('libs/poi-ooxml-schemas-3.10-reduced-less.jar')
}
what must i do?
thx before :)
You're including the support library. Unfortunately it will not work with support library, because I've reduced the quantity of methods in the POI and schemas to be slightly less than 65K, but it is still far too much if you include any other large jar containing thousands of methods.
I see.. thx for answer..
do you know another solution or library to read xlsx file on Android?
POI and Schemas is too large library..
There's something from Aspose, but with quite hostile licensing. Do you really need support library in your project? It is often possible to implement everything needed with a few extra methods and layouts.