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.

react native upgrade 0.64.2 to 0.66.1

See original GitHub issue

New Version

0.66.1

Old Version

0.64.2

Build Target(s)

buildToolsVersion = “30.0.2” compileSdkVersion = 30 targetSdkVersion = 30

Output of react-native info

Task :app:checkDevDebugAarMetadata FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0. Use ‘–warning-mode all’ to show the individual deprecation warnings. See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings 187 actionable tasks: 180 executed, 7 up-to-date

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:app:checkDevDebugAarMetadata’.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction The minCompileSdk (31) specified in a dependency’s AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module’s compileSdkVersion (android-30). Dependency: androidx.core:core:1.7.0. AAR metadata file: /Users/malikhezretov/.gradle/caches/transforms-3/8dffba8f50f81940e51ed01576f31fbd/transformed/core-1.7.0/META-INF/com/android/build/gradle/aar-metadata.properties.

  • 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

BUILD FAILED in 31s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDevDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ‘:app:checkDevDebugAarMetadata’.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction The minCompileSdk (31) specified in a dependency’s AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module’s compileSdkVersion (android-30). Dependency: androidx.core:core:1.7.0. AAR metadata file: /Users/malikhezretov/.gradle/caches/transforms-3/8dffba8f50f81940e51ed01576f31fbd/transformed/core-1.7.0/META-INF/com/android/build/gradle/aar-metadata.properties.

  • 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

BUILD FAILED in 31s

at makeError (/Users/malikhezretov/autumn-frontend-mobile/node_modules/execa/index.js:174:9)
at /Users/malikhezretov/autumn-frontend-mobile/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/malikhezretov/autumn-frontend-mobile/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:106:5)
at async Command.handleAction (/Users/malikhezretov/autumn-frontend-mobile/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:192:9)

info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Issue and Reproduction Steps

Upgrade react native version manually using React Native Upgrade Helper from 0.64.2 to 0.66.1. Updated files

Screenshot 2021-11-09 at 11 48 18 AM Screenshot 2021-11-09 at 11 48 32 AM Screenshot 2021-11-09 at 11 49 12 AM Screenshot 2021-11-09 at 11 49 21 AM
  1. yarn
  2. yarn android

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:4
  • Comments:12

github_iconTop GitHub Comments

1reaction
0xsailcommented, Mar 7, 2022

I didn’t upgrade but I have this problem too

1reaction
Gustavo-Kuzecommented, Feb 18, 2022

Same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading to new versions - React Native
You first need to select from and to which version you wish to upgrade, by default the latest major versions are selected. After...
Read more >
React Native Upgrade Helper
React Native Upgrade Helper · What's your current react-native version? · To which version would you like to upgrade?
Read more >
Upgrading react native to latest version - Stack Overflow
1- Just go to package.json file of your project · 2- After that, look for these lines · 3- Change the react-native version...
Read more >
react-native - npm
A framework for building native apps using React. Latest version: 0.70.6, last published: a month ago. Start using react-native in your ...
Read more >
What's New in React Native 0.70 — How to Upgrade and Why ...
The best way to upgrade a React Native project is always to use the React Native Upgrade Helper, which shows the exact file...
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