我有简单的应用程序从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