No resource found that matches the given name (at 'dialogCornerRadius' with


Error:(5, 5) No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius')

C:\speed\other\.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0-alpha1.aar\0532cec11b8a81a20fe8fb077f96364f\res\values-v28\values-v28.xml
Error:(5, 5) No resource found that matches the given name (at 'dialogCornerRadius' with value '?android:attr/dialogCornerRadius').
Error:java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing process D:\Sdk\build-tools\27.0.1\aapt.exe with arguments {package -f --no-crunch -I D:\Sdk\platforms\android-26\android.jar -M \\?\C:\speed\project\xxx\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -S C:\speed\project\xxx\app\build\intermediates\res\merged\debug -m -J \\?\C:\speed\project\xx\app\build\generated\source\r\debug -F C:\speed\project\xxx\app\build\intermediates\res\debug\resources-debug.ap_ -D \\?\C:\speed\project\xxx\app\build\intermediates\multi-dex\debug\manifest_keep.txt --custom-package com.buyao.tv -0 apk -c en,zh --output-text-symbols \\?\C:\speed\project\xxx\app\build\intermediates\symbols\debug --no-version-vectors}

原因,支持库版本是28,但是buildTool编译版本不是28 仔细检查发现只有26+的写法可疑
解决方案


configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")
                    && !requested.name.startsWith("exifinterface")) {
                details.useVersion '26.1.0'
                //不设置24.2.1但是设置到了25就找不到布局,全部不管好像又冲突设置24.2.1 那么 要么冲突 要么       java.lang.NoSuchFieldError: No field notification_template_lines of type
            }
        }
    }
}

解决方案2,

  supportLibraryVersion = '26.+'

改成具体的版本26.0.2
解决方法3,第二种方法并不能解决,原因是某些第三方导致,方法就是强制升级所有为最新,或者按照方法2的方法强制统一降级,

    原文作者:情随事迁666
    原文地址: https://www.jianshu.com/p/3bffd8e1a5da
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞