我的問題是添加路徑到build.gradle時,我無法運行代碼。com.android.ide.common.process.ProcessException:進程'完成非零退出值2
下面是我的build.gradle文件。
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile project(':android-auto-scroll-view-pager-master 2')
compile project(':android-mapviewballoons')
compile project(':android-newpopupmenu-lib')
compile project(':android-support-v7-appcompat-master')
compile project(':ImageViewTouch')
compile project(':pulltorefresh')
compile files('libs/picasso-2.5.2.jar')
compile "com.google.android.gms:play-services-gcm:8.4.0"
}
android {
compileSdkVersion 20
buildToolsVersion "23.0.2"
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice.txt'
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
// Move the tests to tests/java, tests/res, etc...
instrumentTest.setRoot('tests')
// Move the build types to build-types/<type>
// For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
// This moves them out of them default location under src/<type>/... which would
// conflict with src/ being used by the main source set.
// Adding new build types or product flavors should be accompanied
// by a similar customization.
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
}
我得到的錯誤是:
錯誤:執行失敗的任務 ':XXX:dexDebug'。
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_79\bin\java.exe'' finished with non-zero exit value 2
我不知道build.gradle有什麼問題。
請幫我解決它。
試試這個,但得到同樣的錯誤 –