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.

Gradle "Implicit dependencies between tasks" warning on fresh install

See original GitHub issue

Description

Multiple warnings on a fresh React Native project during Android Release build.

The warnings are related with Implicit Dependencies.

Eg.

Execution optimizations have been disabled for task ':app:copyReleaseBundledJs' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '<path>/PocDependency/android/app/build/intermediates'. Reason: Task ':app:analyticsRecordingRelease' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

Please see full log on code example.

Thank you.

Version

0.67.3

Output of npx react-native info

npx react-native info
info Fetching system and libraries information...
System:
    OS: macOS 12.2.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 179.91 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.9.1 - ~/.nvm/versions/node/v16.9.1/bin/node
    Yarn: 1.22.17 - ~/.yarn/bin/yarn
    npm: 7.21.1 - ~/.nvm/versions/node/v16.9.1/bin/npm
    Watchman: 2021.12.13.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.10.0 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3
    Android SDK:
      API Levels: 25, 26, 28, 29, 30, 31
      Build Tools: 25.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.2
      System Images: android-21 | Google APIs Intel x86 Atom_64, android-25 | Google APIs Intel x86 Atom, android-28 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 4.2 AI-202.7660.26.42.7486908
    Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_251 - /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.67.3 => 0.67.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

Steps to reproduce

  1. npx react-native init ProjectName
  2. cd ProjectName
  3. npx react-native run-android --variant release

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

npx react-native run-android --variant release output:

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...

> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
                    Welcome to Metro!
              Fast - Scalable - Integrated


info Writing bundle output to:, /Users/william/Documents/projects/temp/PocDependency/android/app/build/generated/assets/react/release/index.android.bundle
info Writing sourcemap output to:, /Users/william/Documents/projects/temp/PocDependency/android/app/build/generated/sourcemaps/react/release/index.android.bundle.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 1 asset files
info Done copying assets

> Task :app:copyReleaseBundledJs
Execution optimizations have been disabled for task ':app:copyReleaseBundledJs' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates'. Reason: Task ':app:analyticsRecordingRelease' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:processReleaseMainManifest
Execution optimizations have been disabled for task ':app:processReleaseMainManifest' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/navigation_json/release/navigation.json'. Reason: Task ':app:processReleaseMainManifest' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[androidx.vectordrawable:vectordrawable-animated:1.0.0] /Users/william/.gradle/caches/transforms-3/5232169e73d4423ea21d51876a2d84b1/transformed/vectordrawable-animated-1.0.0/AndroidManifest.xml Warning:
        Package name 'androidx.vectordrawable' used in: androidx.vectordrawable:vectordrawable-animated:1.0.0, androidx.vectordrawable:vectordrawable:1.0.1.

> Task :app:processReleaseManifest
Execution optimizations have been disabled for task ':app:processReleaseManifest' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/compatible_screen_manifest/release'. Reason: Task ':app:processReleaseManifest' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/merged_manifest/release/AndroidManifest.xml'. Reason: Task ':app:processReleaseManifest' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:compressReleaseAssets
Execution optimizations have been disabled for task ':app:compressReleaseAssets' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/merged_assets/release/out'. Reason: Task ':app:compressReleaseAssets' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:sdkReleaseDependencyData
Execution optimizations have been disabled for task ':app:sdkReleaseDependencyData' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/metadata_library_dependencies_report/release/dependencies.pb'. Reason: Task ':app:sdkReleaseDependencyData' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:processReleaseManifestForPackage
Execution optimizations have been disabled for task ':app:processReleaseManifestForPackage' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/merged_manifests/release'. Reason: Task ':app:processReleaseManifestForPackage' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:mergeReleaseJavaResource
Execution optimizations have been disabled for task ':app:mergeReleaseJavaResource' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/java_res/release/out'. Reason: Task ':app:mergeReleaseJavaResource' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:mergeExtDexRelease
Execution optimizations have been disabled for task ':app:mergeExtDexRelease' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/duplicate_classes_check/release'. Reason: Task ':app:mergeExtDexRelease' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/external_file_lib_dex_archives/release'. Reason: Task ':app:mergeExtDexRelease' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:mergeReleaseNativeLibs
Execution optimizations have been disabled for task ':app:mergeReleaseNativeLibs' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/merged_jni_libs/release/out'. Reason: Task ':app:mergeReleaseNativeLibs' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.

> Task :app:stripReleaseDebugSymbols
Execution optimizations have been disabled for task ':app:stripReleaseDebugSymbols' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/william/Documents/projects/temp/PocDependency/android/app/build/intermediates/merged_native_libs/release/out'. Reason: Task ':app:stripReleaseDebugSymbols' uses this output of task ':app:copyReleaseBundledJs' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#implicit_dependency for more details about this problem.
Unable to strip the following libraries, packaging them as they are: libbetter.so, libc++_shared.so, libfabricjni.so, libfb.so, libfbjni.so, libfolly_futures.so, libfolly_json.so, libglog.so, libglog_init.so, libimagepipeline.so, libjsc.so, libjscexecutor.so, libjsi.so, libjsijniprofiler.so, libjsinspector.so, liblogger.so, libmapbufferjni.so, libnative-filters.so, libnative-imagetranscoder.so, libreact_codegen_rncore.so, libreact_debug.so, libreact_nativemodule_core.so, libreact_render_animations.so, libreact_render_attributedstring.so, libreact_render_componentregistry.so, libreact_render_core.so, libreact_render_debug.so, libreact_render_graphics.so, libreact_render_imagemanager.so, libreact_render_leakchecker.so, libreact_render_mapbuffer.so, libreact_render_mounting.so, libreact_render_runtimescheduler.so, libreact_render_scheduler.so, libreact_render_telemetry.so, libreact_render_templateprocessor.so, libreact_render_textlayoutmanager.so, libreact_render_uimanager.so, libreact_utils.so, libreactconfig.so, libreactnativeblob.so, libreactnativejni.so, libreactnativeutilsjni.so, libreactperfloggerjni.so, librrc_image.so, librrc_modal.so, librrc_progressbar.so, librrc_root.so, librrc_scrollview.so, librrc_slider.so, librrc_switch.so, librrc_text.so, librrc_textinput.so, librrc_unimplementedview.so, librrc_view.so, libturbomodulejsijni.so, libyoga.so.

> Task :app:installRelease
Installing APK 'app-release.apk' on 'SM-T355Y - 7.1.1' for app:release
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.2/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 10 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD SUCCESSFUL in 51s
37 actionable tasks: 37 executed
info Connecting to the development server...
info Starting the app on "147642cb"...
Starting: Intent { cmp=com.pocdependency/.MainActivity launchParam=MultiScreenLaunchParams { mDisplayId=0 mBaseDisplayId=0 mFlags=0 } }

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:23
  • Comments:37 (10 by maintainers)

github_iconTop GitHub Comments

21reactions
cortinicocommented, Nov 5, 2022

Yes. I’m happy to share that I worked on this issue and it will be fixed with 0.71.0

21reactions
Rehan-05commented, Mar 2, 2022

Facing the Same Issue. Same Version and Same Release Error in React Native. Pleas guide. Thank You

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with validation problems - Gradle User Manual
This error indicates that you have a task which depends on another, but that no explicit or implicit dependency is declared between those...
Read more >
Gradle implicit dependency warning for embed configuration
Gradle detected a problem with the following location: 'mylibrary\build\libs\mylibrary.jar'. Reason: Task ':myproject:jar' uses this output of ...
Read more >
Gradle 7 Warning: Execution optimizations have been disabled
jar'. Reason: Task ':app:startScripts' uses this output of task ':app:customFatJar' without declaring an explicit or implicit dependency. This ...
Read more >
Extend the Android Gradle plugin - Android Developers
Providers also carry task dependency information. When you create a Provider by transforming a Task output, that Task becomes an implicit dependency of...
Read more >
Gradle dependencies | IntelliJ IDEA Documentation - JetBrains
In the Gradle tool window, select a project, on the toolbar, click the Show Dependencies icon or select the Show Dependencies option from...
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