RN 编译app:bundleReleaseJsAndAssets FAILED的坑

app:bundleReleaseJsAndAssets FAILED


具体报错如下:


> Task :app:transformNativeLibsWithStripDebugSymbolForDebugUnable to strip library '/Users/hanker/StudioProjects/uparpusdkdemo/android/app/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi/libpl_droidsonroids_gif.so' due to missing strip tool for ABI 'ARMEABI'. Packaging it as is.> Task :app:bundleReleaseJsAndAssets FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:bundleReleaseJsAndAssets'.> Could not list contents of '/Users/hanker/StudioProjects/uparpusdkdemo/node_modules/node-pre-gyp/node_modules/.bin/needle'. Couldn't follow symbolic link.


网上查了一下,这个错误的可能原因是gradle deamon的缓存问题,关掉cradle deamon,重新再执行一次就可以解决。

 ./gradlew --stop


然后并没有什么作用,仔细看错误日志,发现好像是【node_modules】这个文件的问题,所以正确的操作应该是删除掉这个目录,然后重新编译:

rm -fr node_modules/

yarn

问题得到解决。

你可能感兴趣的:(RN 编译app:bundleReleaseJsAndAssets FAILED的坑)