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的方法强制统一降级,

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 文/假正经的男孩 奥德的办公室满是些稀奇古怪的东西,炽零可以说是瞪圆了眼睛,连连称赞。 奥德似乎很满...
    假正经的男孩阅读 296评论 0 3
  • 所谓的成熟,不过是被习惯磨去了棱角,变得世故而圆滑。我不大喜,哪怕至八旬老妪。而一颗觉醒的灵魂,则是对虚假的生活突...
    娑婆如斯阅读 615评论 9 35
  • 快新年了,给小疯子发了红包,但他没在。红包过期了,退了回来。 心里说什么都是苦涩的。我爱他一如既往,不知他何时才懂...
    木芷依阅读 208评论 0 0
  • 1、点击Return按扭时收起键盘。注意:需要遵从UITextFieldDelegate协议,并设置好代理 -(B...
    李sir35阅读 679评论 0 0

友情链接更多精彩内容