React-Native assembleRelease fails for task ':app:bundleReleaseJsAndAssets'

后端 未结 12 2011
借酒劲吻你
借酒劲吻你 2020-12-13 02:24

When I run ./gradlew assembleRelease build is failed with this error:

Error:Execution failed for task \':app:bundleReleaseJsAndAsse         


        
12条回答
  •  庸人自扰
    2020-12-13 02:44

    This is working for me, Please follow the below steps:-

    1) Stop Running Gradle

     $ cd RectNatoveProjectName & cd android  (Open your project and go to android folder)  
     $ ./gradlew --stop (Run this command to stop old running Gradle service )
    

    2) Update the android app build gradle

    project.ext.react = [
            nodeExecutableAndArgs : ["/usr/local/bin/node"]
    ];
    

    3) Get Node details

    $ which node 
    

    > (Result will be like "/usr/username/.nvm/versions/node/v10.7.0/bin/node")

    4) Link node (very imp step copy the above result in step 3)

    - ln -s /usr/username/.nvm/versions/node/v10.7.0/bin/node /usr/local/bin/node
    

    5) If Step - 4 return file exist - then to go the folder /usr/local/bin/ and delete the "node" file and perform the step -4 again.

    6) If Step - 4 run successfully then this node issue will be resolved.

提交回复
热议问题