IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

Android 关于Bug error: resource android:attr/dialogCornerRadius not found.

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

简单记录

由于工程targetSdkVersion升级到28之后,并且compileSdkVersion 也使用28之后就会出现上述报错。这是由于一些第三方库没有做及时的兼容。很多React Native工程第三库都会报这个错误。如下所示

<pre class="console-output" style="box-sizing: border-box; white-space: pre-wrap; word-wrap: break-word; margin: 0px; position: relative; font-size: 14px; background: rgb(38, 50, 56); color: rgb(233, 237, 237); cursor: text; font-family: "Roboto Mono", monospace !important; padding: 10px 20px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':lottie-react-native:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/lottie-react-native/src/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/lottie-react-native/src/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/lottie-react-native/src/android/build/intermediates/res/merged/release/values/values.xml:2602: error: resource android:attr/fontVariationSettings not found.
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/lottie-react-native/src/android/build/intermediates/res/merged/release/values/values.xml:2603: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':react-native-fs:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/react-native-fs/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/react-native-fs/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/react-native-fs/android/build/intermediates/res/merged/release/values/values.xml:2714: error: resource android:attr/fontVariationSettings not found.
  /Users/jinwenwu/.jenkins/workspace/_feature_INS_APP_DV_2019.11-ULZZDDRITLP453WEMM3EK6BSLW3Q3OCKQGKLLPOKJBCMRR5F2YLA/node_modules/react-native-fs/android/build/intermediates/res/merged/release/values/values.xml:2715: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at [https://help.gradle.org](https://help.gradle.org/)</pre>


解决方法

既然知道了是由于编译问题导致的Bug,那么我们强制修改第三库里的targetSdkVersion和compileSdkVersion 就可以了,解决方法如下,在主工程build.gradle文件中加入下段代码,望对大家有帮助!

allprojects {
    repositories {
        google()
        mavenLocal()
        ............
    }
    subprojects {
        afterEvaluate {
            project ->
                if (project.hasProperty("android")) {
                    android {
                        compileSdkVersion = 28
                        buildToolsVersion = "28.0.3"
                    }
                }
        }
    }
}

文章永久链接:https://tech.souyunku.com/?p=44774


Warning: A non-numeric value encountered in /data/wangzhan/tech.souyunku.com.wp/wp-content/themes/dux/functions-theme.php on line 1154
赞(62) 打赏



未经允许不得转载:搜云库技术团队 » Android 关于Bug error: resource android:attr/dialogCornerRadius not found.

IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码
IDEA2023.1.3破解,IDEA破解,IDEA 2023.1破解,最新IDEA激活码

评论 抢沙发

大前端WP主题 更专业 更方便

联系我们联系我们

觉得文章有用就打赏一下文章作者

微信扫一扫打赏

微信扫一扫打赏


Fatal error: Uncaught Exception: Cache directory not writable. Comet Cache needs this directory please: `/data/wangzhan/tech.souyunku.com.wp/wp-content/cache/comet-cache/cache/https/tech-souyunku-com/index.q`. Set permissions to `755` or higher; `777` might be needed in some cases. in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php:367 Stack trace: #0 [internal function]: WebSharks\CometCache\Classes\AdvancedCache->outputBufferCallbackHandler() #1 /data/wangzhan/tech.souyunku.com.wp/wp-includes/functions.php(5109): ob_end_flush() #2 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(303): wp_ob_end_flush_all() #3 /data/wangzhan/tech.souyunku.com.wp/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters() #4 /data/wangzhan/tech.souyunku.com.wp/wp-includes/plugin.php(470): WP_Hook->do_action() #5 /data/wangzhan/tech.souyunku.com.wp/wp-includes/load.php(1097): do_action() #6 [internal function]: shutdown_action_hook() #7 {main} thrown in /data/wangzhan/tech.souyunku.com.wp/wp-content/plugins/comet-cache/src/includes/traits/Ac/ObUtils.php on line 367