我有簡單的應用程序從Excel文件(2007,.xlsx)中讀取單元格。Apache POI .xlsx閱讀,Gradle不會構建
我正在使用https://github.com/andruhon/android5xlsx庫。
我正在建造時,這個錯誤:http://pastebin.com/80jHfEVT(太長了)
,如果你從這裏需要您可以下載我的項目:https://mega.nz/#!2xwwAAJA!vwr_I7iL_htvem_R5tuZYfcT21xhrg2z2zhMJLzmq8Y密碼是「計算器」(沒有「」)。
來源是同樣喜歡這裏:java.exe finished with non-zero exit value 1(我的問題),但現在我用這gradle這個:
Gradle.build
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
dexOptions {
preDexLibraries false
//incremental true
javaMaxHeapSize "4g"
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = ['--multi-dex']
} else {
dx.additionalParameters += '--multi-dex'
}
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
}
defaultConfig {
applicationId "tona_kriz.kriziksupl"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//project.tasks.withType(com.android.build.gradle.tasks.Dex) {
// additionalParameters=['--core-library'] // --core-library option needed for now, will fix it soon
//}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:multidex:1.0.1'
compile files('libs/poi-3.12-android.jar')
compile files('libs/poi-ooxml-schemas-3.12-20150511.jar')
}
有我的解決方案?
當我同步gradle時即時得到這個錯誤..錯誤:(39,0)在[email protected] –
@RazelSoco上找不到屬性'com'請創建一個新主題或嘗試搜索一下你自己 – tonakriz