添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account v2.14.1 and RN 0.71.0 (Android) Could not get unknown property 'hermesEnabled' for project ':app' of type org.gradle.api.Project. #3959 v2.14.1 and RN 0.71.0 (Android) Could not get unknown property 'hermesEnabled' for project ':app' of type org.gradle.api.Project. #3959 codewithmecoder opened this issue Jan 17, 2023 · 20 comments

Where:
Build file 'E:\projects\electronic-signature-frontend\node_modules\react-native-reanimated\android\build.gradle' line: 246

What went wrong:
A problem occurred evaluating project ':react-native-reanimated'.

Could not get unknown property 'hermesEnabled' for project ':app' of type org.gradle.api.Project.

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
  • Steps to reproduce

  • When I run the app it is showing the error above.
  • Snack or a link to a repository

    dont have

    Reanimated version

    2.14.1

    React Native version

    0.71.0

    Platforms

    Android

    JavaScript runtime

    Workflow

    Architecture

    Build type

    Debug mode

    Device

    Android emulator

    Device model

    No response

    Acknowledgements

    Could not get unknown property 'enableHermes' for project ':app' of type org.gradle.api.Project. #3963

    Hey, unfortunately I wasn't able to reproduce the issue on a fresh RN 0.71.0 app with Reanimated 2.14.1.

    Here are my steps:

    npx react-native@next init MyApp --version 0.71.0 --skip-install
    cd MyApp
    yarn add [email protected]
    # add `plugins: ['react-native-reanimated/plugin'],` in babel.config.js
    # copy FabricExample/src/BokehExample.tsx from react-native-reanimated repo to App.js
    # change `export default function BokehExample` to `export default function App`
    open -a "Android Studio" android
    yarn start --reset-cache
    # Build the app from Android Studio
    
  • Remove all your build folders with rm -rf node_modules android/.cxx android/build android/app/build android/app/.cxx && yarn --force
  • Make sure your app is consistent with the RN 0.71.0 app template: https://react-native-community.github.io/upgrade-helper/?from=0.70.6&to=0.71.0
  • Hey, unfortunately I wasn't able to reproduce the issue on a fresh RN 0.71.0 app with Reanimated 2.14.1.

    Here are my steps:

    npx react-native@next init MyApp --version 0.71.0 --skip-install
    cd MyApp
    yarn add [email protected]
    # add `plugins: ['react-native-reanimated/plugin'],` in babel.config.js
    # copy FabricExample/src/BokehExample.tsx from react-native-reanimated repo to App.js
    # change `export default function BokehExample` to `export default function App`
    open -a "Android Studio" android
    yarn start --reset-cache
    # Build the app from Android Studio
    
  • Remove all your build folders with rm -rf node_modules android/.cxx android/build android/app/build android/app/.cxx && yarn --force
  • Make sure your app is consistent with the RN 0.71.0 app template: https://react-native-community.github.io/upgrade-helper/?from=0.70.6&to=0.71.0
  • Thanks for the suggestion. I'll try it and let you know. Thanks again.

    Leaving it here for future reference. Changing the if condition works for me. thanks.

       if (REACT_NATIVE_MINOR_VERSION >= 71 && appProject?.ext?.react?.enableHermes?.toBoolean()) {
           return "hermes"
      bimix, leoamato10, christopherldo, nomanoff, cgorrieri, victorebpdev, ALI-SAMPSON, restobrill, ziadashraf0, brysonjonesy, and 27 more reacted with thumbs up emoji
      bimix, christopherldo, kagamirr0r, justintoth, koalazub, ALI-SAMPSON, restobrill, ParthNandaniya, njokusomto, yoondj98, and 5 more reacted with hooray emoji
      error-try-again, nduyvu1511, diegofranca92, ismjt, MahdiZahrani, arielskap, ronuelbmoralita, akitectio, cauediademi, Warren1704, and 15 more reacted with heart emoji
      amine-ba, diegofranca92, rvenky125, arielskap, mtahir08, nguyenduy7474, cauediademi, bimix, christopherldo, jbellospe, and 15 more reacted with rocket emoji
        All reactions
    

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    This worked for me

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    thanks

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    thanks

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true
    This worked for me as well.

    For expo projects where expo.jsEngine=hermes, could hermesEnabled be automatically enabled?

    After upgrading to 2.14.4 - Could not get unknown property 'hermesEnabled' for project ':app' of type org.gradle.api.Project #3996

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    Worked for me. Thanks.

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    worked for me
    hermesEnabled=true
    was not on my gradle.properties file

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    Worked for me. Thanks.

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    Thanks!!!!

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    it works thanks. But how did you know it will solve the problem

    I had the same issue. Just find the file gradle.properties and add at the end:

    hermesEnabled=true

    worked for me, thanks!