嘿,我在Android上使用android-studio進行開發很新。任務':app:dexDebug'的執行失敗錯誤代碼:1
我加了的onClick,結束了這個錯誤:
FAILURE: Build failed with an exception.
* What went wrong:Execution failed for task ':app:dexDebug'.
com.android.ide.common.internal.LoggedErrorException: Failed to run command: /Users/home/Library/Android/sdk/build-tools/21.1.2/dx --dex --no-optimize --output /Users/home/Documents/****/Android/MyApp/app/build/intermediates/dex/debug --input-list=/Users/home/Documents/****/Android/MyApp/app/build/intermediates/tmp/dex/debug/inputList.txt Error Code: 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
我試着刪除一些依賴,重新安裝和更新的一切,但仍然不起作用。
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "myapp.com.example.home.myapplication"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.3'
// compile 'com.android.support:support-annotations:21.0.+'
}