question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Library build breaks on RN 0.59.8 with error: resource android:attr/dialogCornerRadius not found

See original GitHub issue

Run react-native info in your project and share the content.

info 
  React Native Environment Info:
    System:
      OS: macOS 10.14.4
      CPU: (4) x64 Intel(R) Core(TM) i5-5350U CPU @ 1.80GHz
      Memory: 38.84 MB / 8.00 GB
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 11.2.0 - ~/.nvm/versions/node/v11.2.0/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v11.2.0/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
      Android SDK:
        API Levels: 23, 26, 27, 28
        Build Tools: 27.0.3, 28.0.2, 28.0.3
        System Images: android-28 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.2 AI-181.5540.7.32.5056338
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.8 => 0.59.8 
    npmGlobalPackages:
      react-native-cli: 2.0.1
      react-native-gesture-handler: 1.2.1
      react-native-git-upgrade: 0.2.7

What react-native-splash-screen version are you using?

3.1.1

What platform does your issue occur on? (Android/iOS/Both)

Android

Describe your issue as precisely as possible :

  1. Steps to reproduce the issue or to explain in which case you get the issue
  2. Interesting logs

There is a build error when building the library with Android SDK 28.

buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"

Build error

> Task :react-native-splash-screen:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-splash-screen:verifyReleaseResources'.
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  /Users/navalsaini/hf/android/node_modules/react-native-splash-screen/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.
  /Users/navalsaini/hf/android/node_modules/react-native-splash-screen/android/build/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  /Users/navalsaini/hf/android/node_modules/react-native-splash-screen/android/build/intermediates/res/merged/release/values/values.xml:2727: error: resource android:attr/fontVariationSettings not found.
  /Users/navalsaini/hf/android/node_modules/react-native-splash-screen/android/build/intermediates/res/merged/release/values/values.xml:2728: error: resource android:attr/ttcIndex not found.
  error: failed linking references.

Seems like dialogCornerRadius, fontVariationSettings and ttcIndex are remobetween android sdk 26 and 28.

Join a screenshot or video of the problem on the simulator or device?

Show us the code you are using?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:9

github_iconTop GitHub Comments

20reactions
Iamherecommented, Aug 9, 2019

Try running it with ./gradlew app:assembleRelease instead of ./gradlew assembleRelease

5reactions
flipflopappcommented, May 15, 2019

(We can close this issue)

It went away in version

  • “react-native-splash-screen”: “^3.2.0”,

I can see that following was added to build.gradle in the code.

def supportLibVersion = rootProject.hasProperty('supportLibVersion') ? rootProject.supportLibVersion : DEFAULT_SUPPORT_LIB_VERSION
...
implementation "com.android.support:appcompat-v7:$supportLibVersion"

I believe this fixed my issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native Android build failure with different errors without ...
The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 . Note: Error may be different but...
Read more >
Troubleshooting - React Native
Missing libraries for React​. If you added React Native manually to your project, make sure you have included all the relevant dependencies ...
Read more >
react-native-orientation-locker - npm
A react-native module that can listen on orientation changing of device, get current orientation, lock to preferred orientation.
Read more >
Addressing common errors in React Native - LogRocket Blog
Explore common React Native errors such as "command not found" and learn about their causes and potential solutions.
Read more >
Handling 64-bit Android Builds for React Native - Red Shift
This post assumes you've already upgraded React Native in your app to ≥ 0.59.8. If not, a lot of posts recommend rn-diff-purge for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found