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.

Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version.

See original GitHub issue

Description

When I run yarn android I’m presented with this:

yarn android yarn run v1.22.18 $ react-native run-android info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag. Jetifier found 946 file(s) to forward-jetify. Using 4 workers… info JS server already running. info Installing the app… Starting a Gradle Daemon (subsequent builds will be faster)

Configure project :app Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.

Task :app:installDebug Installing APK ‘app-debug.apk’ on ‘Pixel_4(AVD) - 12’ for app:debug Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use ‘–warning-mode all’ to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 46s 55 actionable tasks: 2 executed, 53 up-to-date info Connecting to the development server… 8081 info Starting the app on “emulator-5554”… Starting: Intent { cmp=com.instagram2/.MainActivity } Done in 52.86s.

Version

0.68.1

Output of npx react-native info

Fetching system and libraries information… System: OS: Linux 5.17 Manjaro Linux CPU: (4) x64 Intel® Core™ i5-2500S CPU @ 2.70GHz Memory: 24.76 GB / 31.33 GB Shell: 5.1.16 - /bin/bash Binaries: Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node Yarn: 1.22.18 - ~/.nvm/versions/node/v16.14.2/bin/yarn npm: 8.6.0 - ~/.nvm/versions/node/v16.14.2/bin/npm Watchman: 4.9.0 - /usr/bin/watchman SDKs: Android SDK: API Levels: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 7, 8, 9 Build Tools: 19.1.0, 20.0.0, 21.1.2, 22.0.1, 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0, 32.0.0, 32.1.0, 33.0.0 System Images: android-10 | ARM EABI v7a, android-10 | Intel x86 Atom, android-10 | Google APIs ARM EABI v7a, android-10 | Google APIs Intel x86 Atom, android-14 | ARM EABI v7a, android-15 | ARM EABI v7a, android-15 | Intel x86 Atom, android-15 | Google APIs ARM EABI v7a, android-15 | Google APIs Intel x86 Atom, android-16 | ARM EABI v7a, android-16 | MIPS, android-16 | Intel x86 Atom, android-16 | Google APIs ARM EABI v7a, android-16 | Google APIs Intel x86 Atom, android-17 | ARM EABI v7a, android-17 | MIPS, android-17 | Intel x86 Atom, android-17 | Google APIs ARM EABI v7a, android-17 | Google APIs Intel x86 Atom, android-18 | ARM EABI v7a, android-18 | Intel x86 Atom, android-18 | Google APIs ARM EABI v7a, android-18 | Google APIs Intel x86 Atom, android-19 | ARM EABI v7a, android-19 | Intel x86 Atom, android-19 | Google APIs ARM EABI v7a, android-19 | Google APIs Intel x86 Atom, android-21 | Android TV ARM EABI v7a, android-21 | Android TV Intel x86 Atom, android-21 | ARM EABI v7a, android-21 | Intel x86 Atom, android-21 | Intel x86 Atom_64, android-21 | Google APIs ARM EABI v7a, android-21 | Google APIs Intel x86 Atom, android-21 | Google APIs Intel x86 Atom_64, android-22 | Android TV Intel x86 Atom, android-22 | ARM EABI v7a, android-22 | Intel x86 Atom, android-22 | Intel x86 Atom_64, android-22 | Google APIs ARM EABI v7a, android-22 | Google APIs Intel x86 Atom, android-22 | Google APIs Intel x86 Atom_64, android-23 | Android TV ARM EABI v7a, android-23 | Android TV Intel x86 Atom, android-23 | ARM EABI v7a, android-23 | Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-24 | Android TV Intel x86 Atom, android-24 | ARM 64 v8a, android-24 | ARM EABI v7a, android-24 | Intel x86 Atom, android-24 | Intel x86 Atom_64, android-24 | Google APIs ARM 64 v8a, android-24 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-25 | Android TV Intel x86 Atom, android-25 | China version of Android Wear ARM EABI v7a, android-25 | China version of Android Wear Intel x86 Atom, android-25 | Android Wear ARM EABI v7a, android-25 | Android Wear Intel x86 Atom, android-25 | ARM 64 v8a, android-25 | Intel x86 Atom, android-25 | Intel x86 Atom_64, android-25 | Google APIs ARM 64 v8a, android-25 | Google APIs ARM EABI v7a, android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-25 | Google Play Intel x86 Atom, android-26 | Android TV Intel x86 Atom, android-26 | China version of Android Wear Intel x86 Atom, android-26 | Android Wear Intel x86 Atom, android-26 | ARM 64 v8a, android-26 | Intel x86 Atom, android-26 | Intel x86 Atom_64, android-26 | Google APIs ARM 64 v8a, android-26 | Google APIs Intel x86 Atom, android-26 | Google APIs Intel x86 Atom_64, android-26 | Google Play Intel x86 Atom, android-27 | Android TV Intel x86 Atom, android-27 | ARM 64 v8a, android-27 | Intel x86 Atom, android-27 | Intel x86 Atom_64, android-27 | Google APIs ARM 64 v8a, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-28 | Android TV Intel x86 Atom, android-28 | China version of Wear OS Intel x86 Atom, android-28 | Wear OS Intel x86 Atom, android-28 | ARM 64 v8a, android-28 | Intel x86 Atom, android-28 | Intel x86 Atom_64, android-28 | Google APIs ARM 64 v8a, android-28 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom_64, android-28 | Google ARM64-V8a Play ARM 64 v8a, android-28 | Google Play Intel x86 Atom, android-28 | Google Play Intel x86 Atom_64, android-29 | Android TV Intel x86 Atom, android-29 | ARM 64 v8a, android-29 | Intel x86 Atom, android-29 | Intel x86 Atom_64, android-29 | Google APIs ARM 64 v8a, android-29 | Google APIs Intel x86 Atom, android-29 | Google APIs Intel x86 Atom_64, android-29 | Google Play ARM 64 v8a, android-29 | Google Play Intel x86 Atom, android-29 | Google Play Intel x86 Atom_64, android-30 | Android TV Intel x86 Atom, android-30 | China version of Wear OS 3 - Preview Intel x86 Atom, android-30 | Wear OS 3 - Preview ARM 64 v8a, android-30 | Wear OS 3 - Preview Intel x86 Atom, android-30 | ARM 64 v8a, android-30 | Intel x86 Atom_64, android-30 | Google TV Intel x86 Atom, android-30 | Google APIs ARM 64 v8a, android-30 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom_64, android-30 | Google Play ARM 64 v8a, android-30 | Google Play Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64, android-31 | Android TV Intel x86 Atom, android-31 | ARM 64 v8a, android-31 | Intel x86 Atom_64, android-31 | Google TV Intel x86 Atom, android-31 | Google APIs ARM 64 v8a, android-31 | Google APIs Intel x86 Atom_64, android-31 | Google Play ARM 64 v8a, android-31 | Google Play Intel x86 Atom_64, android-32 | Google APIs ARM 64 v8a, android-32 | Google APIs Intel x86 Atom_64, android-32 | Google Play ARM 64 v8a, android-32 | Google Play Intel x86 Atom_64, android-Tiramisu | Google APIs ARM 64 v8a, android-Tiramisu | Google APIs Intel x86 Atom_64, android-Tiramisu | Google Play ARM 64 v8a, android-Tiramisu | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: AI-211.7628.21.2111.8309675 Languages: Java: 17.0.3 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 npmGlobalPackages: react-native: Not Found

Steps to reproduce

open VS Code In the terminal write yarn android

Snack, code example, screenshot, or link to a repository

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
cortinicocommented, Apr 21, 2022

This is a warning of AGP which is outside our control. See https://issuetracker.google.com/issues/195025261 for more context.

It got fixed in AGP 7.1 (and versions afterwards) so it will go away in RN 0.69. For the time being you’re fine discarding this warning.

1reaction
torretorichcommented, May 17, 2022

I also get the same issue Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated. How to solve this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to upgrade AGP version - android
You have to manually change the gradle versions in build.gradle.kts (project) and then in gradle-wrapper.properties to version that matches ...
Read more >
Warning evaluating Gradle 7.2-rc-1, AGP 7.0 [195025261]
Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the...
Read more >
unable to detect agp versions for included builds. all ...
Configure project :app Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version.
Read more >
Use the Android Gradle plugin Upgrade Assistant
The Android Gradle plugin (AGP) Upgrade Assistant is a tool in Android Studio that helps you upgrade the version of AGP used by...
Read more >
build-system/gradle-core/src/main/java/com/ ...
else -> project.logger.warn(. "Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. "...
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