react-native-masked-view / masked-view

React Native Masked View Library
MIT License
974 stars 126 forks source link

Execution failed for task ':react-native-community_masked-view:generateDebugRFile' #183

Closed davmaene closed 1 year ago

davmaene commented 1 year ago

I'm new to RN, my application was working fine, but since I installed an X module I'm starting to encounter a problem related to Execution failed for task ':react-native-community_masked-view:generateDebugRFile' someone can help me please. here is the error message


* What went wrong:
Execution failed for task ':react-native-community_masked-view:generateDebugRFile'.
> Could not resolve all files for configuration ':react-native-community_masked-view:debugCompileClasspath'.
   > Failed to transform react-native-0.71.0-rc.0-debug.aar (com.facebook.react:react-native:0.71.0-rc.0) to match attributes {artifactType=android-symbol-with-package-name, com.android.build.api.attributes.BuildTypeAttr=debug, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-api}.
      > Execution failed for JetifyTransform: C:\Users\DavidMaene\.gradle\caches\modules-2\files-2.1\com.facebook.react\react-native\0.71.0-rc.0\7a7f5a0af6ebd8eb94f7e5f7495e9d9684b4f543\react-native-0.71.0-rc.0-debug.aar.
         > Java heap space

* 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 14m 21s```

And my package.json file is 

```{
  "name": "balabala",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint ."
  },
  "dependencies": {
    "@react-native-community/masked-view": "^0.1.11",
    "@react-native-community/netinfo": "^7.1.9",
    "@react-native-community/viewpager": "^5.0.11",
    "@react-navigation/native": "^6.0.7",
    "@react-navigation/native-stack": "^6.3.0",
    "@react-navigation/stack": "^6.1.0",
    "axios": "^0.25.0",
    "expo-asset": "^8.4.6",
    "expo-constants": "^13.0.1",
    "expo-file-system": "^13.1.3",
    "expo-font": "^10.0.4",
    "expo-modules-core": "^0.6.4",
    "react": "17.0.2",
    "react-native": "0.67.1",
    "react-native-check-box": "^2.1.7",
    "react-native-dialogbox": "^0.6.10",
    "react-native-esc-pos-printer": "^1.8.0",
    "react-native-gesture-handler": "^2.8.0",
    "react-native-nfc-manager": "^3.13.0",
    "react-native-pager-view": "^5.4.9",
    "react-native-pos-printer": "^1.0.5",
    "react-native-reanimated": "^2.13.0",
    "react-native-safe-area-context": "^3.3.2",
    "react-native-screens": "^3.18.2",
    "react-native-sqlite-2": "^3.5.2",
    "react-native-tab-view": "^3.1.1",
    "react-native-thermal-printer": "^2.3.1",
    "react-native-vector-icons": "^9.0.0",
    "rn-fetch-blob": "^0.12.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@babel/runtime": "^7.12.5",
    "@react-native-community/eslint-config": "^2.0.0",
    "babel-jest": "^26.6.3",
    "eslint": "7.14.0",
    "jest": "^26.6.3",
    "metro-react-native-babel-preset": "^0.66.2",
    "react-test-renderer": "17.0.2"
  },
  "jest": {
    "preset": "react-native"
  }
}
vikashbhut commented 1 year ago

@davmaene

🛳️ 0.67.5: https://github.com/facebook/react-native/releases/tag/v0.67.5

By updating to these patch versions, your Android build should start working again.

To do so, in your package.json change react-native's version to the relevant new patch (ex. if you are on 0.64.3, change to 0.64.4) and run yarn install. No other changes should be necessary, but you might want to clean your android artifacts with a cd android && ./gradlew clean before trying to re-run your Android app.

davmaene commented 1 year ago

thank you so much, this solution works for me