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

Android support 28.0.0-alpha1 产生的问题

Process 'command 'E:\Sdk\build-tools\27.0.3\aapt.exe'' finished with non-zero exit value 1_第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_第2张图片

你可能感兴趣的:(android)