我在Android Studio 3.0.1中遇到了以下构建问题,但我无法解决它。在此期间我无法运行我的应用程序。
com.android.builder.dexing.DexArchiveBuilderException:com.android.builder.dexing.DexArchiveBuilderException: Failed to process /home/Code/StudioProjects/aac/app/build/intermediates/transforms/instantRunSlicer/debug/7
...
Gradle控制台说NoSuchElementException扮演一个角色,但它不会将此异常链接到我的代码中的任何内容。
Caused by: java.util.NoSuchElementException
at java.util.LinkedList$ListItr.previous(LinkedList.java:905)
我的build.gradle如下。
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 26
defaultConfig {
applicationId "this.app.id.is" // had to change appID for privacy
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
buildToolsVersion '26.0.2'
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:recyclerview-v7:26.1.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.+' // Third-party library. Copyright 2016, Arthur Teplitzki, 2013, Edmodo, Inc
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.0'
}
如果有人对如何解决此错误有任何想法,将不胜感激。
在运行配置“编辑运行配置”窗口中,禁用运行配置中的高级分析字段