在构建我的android项目时出现此错误。我以前没有收到此错误,但是最近我更新了gradle版本以支持即时应用程序。 我想知道是不是导致问题的原因。
任务':vuclip:processProdAutoFeatureResources'的执行失败。 AAPT2 aapt2-3.2.1-4818971-osx守护程序#0:链接期间发生异常错误,试图停止守护程序。 通常情况下不应发生这种情况,如果确实如此,请提出问题。
编辑:代码可以很好地编译,但是在使用命令./gradlew clean build
构建apk时,构建失败,但出现上述异常。
build.gradle
apply plugin: 'com.android.feature'
android {
compileSdkVersion buildVersion.targetSdk
defaultConfig {
baseFeature true
minSdkVersion buildVersion.minSdk
targetSdkVersion buildVersion.targetSdk
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
lintOptions {
disable 'MissingTranslation'
checkReleaseBuilds false
abortOnError false
}
}
debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
versionNameSuffix "-debug"
}
e2e {
initWith debug
debuggable true
minifyEnabled false
versionNameSuffix "-e2e"
}
auto {
initWith release
debuggable true
versionNameSuffix "-auto"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
application project(':viuapp')
feature project(':discover')
api "com.android.support:appcompat-v7:$versions.supportLibrary"
api "com.android.support:design:$versions.supportLibrary"
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
api project(':boot')
api project(':utilities')
api project(':analytics')
api project(':viu-logger')
api project(':fonts')
api project(':viu-constants')
api project(':app_context')
api project(':storage')
api project(':datamodels')
}
repositories {
mavenCentral()
}
答案 0 :(得分:0)
尝试: 文件->使缓存无效/重新启动以及使无效并重新启动
答案 1 :(得分:0)
我终于能够修复它。问题是我已将一个模块制作为库,而未将其添加到基本模块中。您所有的功能模块必须被添加为播放模块中的依赖项。