在网上搜索,目前尚不清楚Java 8是否支持Android开发.
在我下载/设置Java 8之前,有人可以在任何"官方"文档中指出我说Java 8是否支持Android开发.
当我尝试编译我的应用程序时,我收到以下错误
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_60\bin\java.exe'' finished with non-zero exit value 2
Run Code Online (Sandbox Code Playgroud)
如果我摆脱Facebook Android SDK它编译没有问题.
我的build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21 //tried 19 and 22 changing targetSdkVersion and buildToolsVersion accordingly
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "..."
minSdkVersion 15
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
...
}
dependencies {
...
compile 'com.facebook.android:facebook-android-sdk:3.23.1' //tried older versions as well
}
Run Code Online (Sandbox Code Playgroud) java android gradle facebook-android-sdk android-gradle-plugin
错误:任务':app:transformClassesWithDexForDebug'的执行失败.com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:进程'命令'C:\ Program Files\Java\jdk1.7.0_79\bin\java.exe''以非零退出值1结束
这是我的gradle构建文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "br.com.gerenciarsc.nfce"
minSdkVersion 12
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile('org.simpleframework:simple-xml:2.7.1') {
exclude group: 'xpp3', module: 'xpp3'
exclude group: 'stax', module: 'stax-api'
exclude group: 'stax', module: 'stax'
}
compile 'com.google.code.gson:gson:2.5'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'
compile 'com.beardedhen:androidbootstrap:2.0.0'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:design:23.1.1'
compile …
Run Code Online (Sandbox Code Playgroud)