繁体   English   中英

任务 ':app:transformNativeLibsWithMergeJniLibsForDebug' 执行失败

[英]Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'

每当我运行“react-native run-android”时,我都会在 99% 时收到此错误消息:

任务“:app:transformNativeLibsWithMergeJniLibsForDebug”的执行失败。

无法解析配置“:app:debugRuntimeClasspath”的所有文件。 无法转换工件“imagepipeline-base.aar (com.facebook.fresco:imagepipeline-base:2.0.0)”以匹配属性 {artifactType=android-java-res}。 AarTransform 执行失败:C:\\Users\\ronsi.gradle\\caches\\transforms-2\\files-2.1\\36b5e92c216129ce5187eea1bb53cf04。 无法解析结果路径字符串:无法转换工件 'soloader.aar (com.facebook.soloader:soloader:0.6.0)' 以匹配属性 {artifactType=android-java-res}。 AarTransform 执行失败:C:\\Users\\ronsi.gradle\\caches\\transforms-2\\files-2.1\\6e75901105f09a338e73b93bf40fcae8。 无法解析结果路径字符串:

在 11 秒内构建失败

at checkExecSyncError (child_process.js:623:11)
at execFileSync (child_process.js:641:15)
at runOnAllDevices (C:\Users\ronsi\Documents\repos\bahad\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:74:39)
at buildAndRun (C:\Users\ronsi\Documents\repos\bahad\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:158:41)
at C:\Users\ronsi\Documents\repos\bahad\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:85:5)
at async Command.handleAction (C:\Users\ronsi\Documents\repos\bahad\node_modules\@react-native-community\cli\build\cliEntry.js:160:7)

通过删除文件夹解决:C:\\Users\\UserName.gradle\\caches\\transforms-2

转到您的 android 文件夹运行命令:

gradlew clean

然后运行:

react-native run-android

写就好了

cd android && ./gradlew clean && cd ..

然后写

react-native run-android

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM