mac 安卓打包失败 Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.



  • 完整信息

    > Configure project :app 
    WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
    Android SDK Build Tools 27.0.3 will be used.
    To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
    
    > Configure project :react-native-gesture-handler 
    WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
    Android SDK Build Tools 27.0.3 will be used.
    To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
    
    > Configure project :react-native-splash-screen 
    WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    WARNING: Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    WARNING: Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
    Android SDK Build Tools 27.0.3 will be used.
    To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
    
    > Configure project :react-native-vector-icons 
    WARNING: The specified Android SDK Build Tools version (26.0.3) is ignored, as it is below the minimum supported version (27.0.3) for Android Gradle Plugin 3.1.4.
    Android SDK Build Tools 27.0.3 will be used.
    To suppress this warning, remove "buildToolsVersion '26.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
    
    > Configure project :react-native-video 
    WARNING: Configuration 'provided' is obsolete and has been replaced with 'compileOnly'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
    It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
    
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Failed to capture snapshot of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
    > Could not list contents of '/Users/mao/Desktop/lzbk/node_modules/node-pre-gyp/node_modules/.bin/needle'. Couldn't follow symbolic link.
    
    * 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 3s
    48 actionable tasks: 1 executed, 47 up-to-date
    


  • 我重新安装了依赖,解决了上面的问题。然后我又遇到了新问题
    uncompiled PNG file passed as argument. Must be compiled first into .flat file..

    在android/gradle.properties 中添加了以下代码
    android.enableAapt2=false
    原因是我使用react-navigation3.x的时候 使用了高版本的gradle(前端小白不知道什么是gradle)