masked-view: Task :react-native-community_masked-view:mergeReleaseGeneratedProguardFiles FAILED

Bug

Hi, it makes it impossible to compile my application for Android with “assembleRelease”, I tried to redo a project but same problem.

Error :

> Task :react-native-community_masked-view:mergeReleaseGeneratedProguardFiles FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-community_masked-view:mergeReleaseGeneratedProguardFiles'.
> Collection contains no element matching the predicate.

Environment info

react-native info output:

 System:
    OS: macOS 10.15.4
    CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
    Memory: 465.12 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 12.16.2 - /usr/local/bin/node
    Yarn: 1.12.1 - /usr/local/bin/yarn
    npm: 6.14.4 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.9.1 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK: Not Found
  IDEs:
    Android Studio: 3.5 AI-191.8026.42.35.5977832
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild
  Languages:
    Java: 11.0.1 - /usr/bin/javac
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.11.0 => 16.11.0 
    react-native: 0.62.2 => 0.62.2 
  npmGlobalPackages:
    *react-native*: Not Found

Library version: 0.1.10

Steps To Reproduce

  1. react-native init project
  2. install React Navigation (https://reactnavigation.org/docs/getting-started)
  3. cd android
  4. ./gradlew assembleRelease

And error.

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Reactions: 9
  • Comments: 15

Most upvoted comments

try to use :
cd android && gradlew clean

Hi! After some days i resolve the issue by rub this command in terminal cd android && gradlew clean But if it not work for you so rebuild your project and it will work.

try to use : cd android && gradlew clean

thanks @DurandSacha this solved the issue for me 😄

@vallavans @roadev @oneberto

After setting org.gradle.java.home=<Your JDK location>/adoptopenjdk-8.jdk/Contents/Home in gradle.properties It fixes that issue above. Hope it helps someone.

@vallavans @roadev @oneberto

After setting org.gradle.java.home=/adoptopenjdk-8.jdk/Contents/Home in gradle.properties It fixes that issue above. Hope it helps someone.

Thanks @hengsok, It worked for me