I'm trying to porting Apache Flink on Android. This is my build.gradle
file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "hk.ust.symlab.mobiflink"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/maven/org.apache.flink/force-shading/pom.xml'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/maven/org.apache.flink/force-shading/pom.properties'
exclude 'META-INF/ASL2.0'
exclude 'META-INF/maven/com.google.guava/guava/pom.xml'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/maven/com.google.guava/guava/pom.properties'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:3.8.1'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'org.apache.flink:flink-java:1.0.0-hadoop1'
compile 'org.apache.flink:flink-clients:0.10.2-hadoop1'
}
The weird thing is that if I don't include compile 'org.apache.flink:flink-clients:0.10.2-hadoop1'
then the projects compile and run without errors, otherwise I have this error:
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 1
I've already read a lot of questions about this problem (like this one), but as you can see I already included the multiDexEnabled
option (which was necessary already when I included compile 'org.apache.flink:flink-java:1.0.0-hadoop1'
)