Process 'command 'E:\Sdk\build-tools\27.0.3\aapt.exe'' finished with non-zero exit value 1

时间:2022-07-17 23:03:00

Android support 28.0.0-alpha1 产生的问题

Process 'command 'E:\Sdk\build-tools\27.0.3\aapt.exe'' finished with non-zero exit value 1

出现这个问题原因 是依懒包太新了,编译时会自动找最新的版编译。 我们要固定依懒包就可以解决了 配置如下

configurations.all {

    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '27.1.0'
            }
        }
    }
}

Process 'command 'E:\Sdk\build-tools\27.0.3\aapt.exe'' finished with non-zero exit value 1