android studio aapt err,AAPT error in Android studio while building the project

在更新了Gradle版本以支持即时应用后,Android项目出现构建错误,任务 ':vuclip:processProdAutoFeatureResources' 失败。错误信息提到AAPT2链接过程中发生意外错误,尝试停止守护进程。代码可以正常编译,但使用./gradlew clean build命令打包APK时失败。问题可能与Gradle版本升级有关。
摘要由CSDN通过智能技术生成

I have been getting this error while building my android project. I was not getting this error before but recently I updated my gradle version for supporting instant apps. I'm wondering if thats what causing the issue.

Execution failed for task ':vuclip:processProdAutoFeatureResources'. AAPT2 aapt2-3.2.1-4818971-osx Daemon #0: Unexpected error during link, attempting to stop daemon. This should not happen under normal circumstances, please file an issue if it does.

Edit : The code is compiling fine but while building the apk using the command ./gradlew clean build, the build is failing with the above exception.

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()

}

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值