简体   繁体   English

运行 npm react-native run-android 时突然出错。 任务:应用程序:进程调试资源失败

[英]Sudden error while running the npm react-native run-android. Task :app:processDebugResources FAILED

I suddenly got an error saying Execution failed for task ':app:processDebugResources'.我突然收到一条错误消息,说任务':app:processDebugResources'的执行失败。 Problems reading data from Binary store in C:\Users\prabh\AppData\Local\Temp\gradle13962421950392783403.bin offset 114265 exists?从 C:\Users\prabh\AppData\Local\Temp\gradle13962421950392783403.bin 偏移 114265 中的二进制存储读取数据时出现问题? true I think this error is related to react native firebase.是的,我认为这个错误与反应原生 firebase 有关。 I am using react-native-firebase/app,firebase/auth,firebase/messaging packages.我正在使用 react-native-firebase/app、firebase/auth、firebase/messaging 包。 I am using these packages from long time but never faced an issue before.我很长一段时间都在使用这些软件包,但以前从未遇到过问题。 The only thing I did hours before getting this error is npm audit fix to fix some vulnerabulities.我在收到此错误前几个小时所做的唯一一件事是 npm 审计修复以修复一些漏洞。 Anyone got a similar error?有人遇到类似的错误吗?

build.gradle dependencies: build.gradle 依赖:

    implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+"  // From node_modules
implementation 'com.google.firebase:firebase-analytics:17.3.0' //For Notifications
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
implementation project(':react-native-vector-icons')
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' // <-- add this; newer versions should work too
implementation project(':react-native-fs') //addes Manually compile project
implementation project(':react-native-get-real-path')
implementation 'com.facebook.fresco:fresco:2.0.0'
// For animated GIF support
implementation 'com.facebook.fresco:animated-gif:2.0.0'
// For WebP support, including animated WebP
implementation 'com.facebook.fresco:animated-webp:2.0.0'
implementation 'com.facebook.fresco:webpsupport:2.0.0'

This is worked for me on Windows 10 and Android.这适用于我在 Windows 10 和 Android 上。 I didn't try on Mac or Linux.我没有在 Mac 或 Linux 上尝试。 I saw that from https://github.com/gradle/gradle/issues/8489 @jack7891 Thank you jack.我从https://github.com/gradle/gradle/issues/8489 @jack7891 看到了,谢谢杰克。 android/build.gradle classpath 'com.google.gms:google-services:4.3.4' to classpath 'com.google.gms:google-services:4.3.5' android/build.gradle classpath 'com.google.gms:google-services:4.3.4'到类路径'com.google.gms:google-services:4.3.5'

android/app/build.gradle implementation 'com.google.firebase:firebase-analytics:17.3.0' to implementation 'com.google.firebase:firebase-analytics:18.0.2' android/app/build.gradle implementation 'com.google.firebase:firebase-analytics:17.3.0'implementation 'com.google.firebase:firebase-analytics:18.0.2'

package.json package.json

 "@react-native-firebase/app": "^11.1.2",
 "@react-native-firebase/auth": "^11.1.2",
 "@react-native-firebase/firestore": "^11.1.2",
 "@react-native-firebase/storage": "^11.1.2",
 "@react-native-firebase/messaging": "^11.1.2",
 "react-native-push-notification": "^7.2.3",

to

 "@react-native-firebase/app": "^11.5.0",
 "@react-native-firebase/auth": "^11.5.0",
 "@react-native-firebase/firestore": "^11.5.0",
 "@react-native-firebase/storage": "^11.5.0",
 "@react-native-firebase/messaging": "^11.5.0",
 "react-native-push-notification": "^7.3.1",

Then run npm install or yarn install然后运行npm installyarn install

After that, go to android project folder and run:之后,将 go 到 android 项目文件夹并运行:

./gradlew.bat clean

Finally, you can go to project folder and run npx react-native run-android最后,您可以 go 到项目文件夹并运行npx react-native run-android

暂无
暂无

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

相关问题 当运行 react-native run-android 时,它给出了一个错误 Execution failed for task &#39;:app:processDebugResources&#39; - when ran react-native run-android it gives an error Execution failed for task ':app:processDebugResources' 在 react-native run-android 的开发版本上出现错误“Task:app:processDebugResources FAILED” - Error "Task :app:processDebugResources FAILED" on dev build of react-native run-android 在反应本机 android 中构建应用程序时无法运行应用程序(错误:任务 ':app:processDebugResources' 执行失败。) - Unable to run application while build app in react native android (Error : Execution failed for task ':app:processDebugResources'.) 执行 react-native run-android 时任务:app:processDebugResources FAILED - Task :app:processDebugResources FAILED when doing react-native run-android 任务 ':app:processDebugResources' 执行失败。 react-native - Execution failed for task ':app:processDebugResources'. react-native react-native android 构建失败,任务 ':app:processDebugResources' 执行失败。 , 但 iOS 有效 - react-native android build fails with execution failed for task ':app:processDebugResources'. , but iOS works 我第一次使用react-native run-android时遇到了困难。错误如下所示 - I am having a difficulty with first time react-native run-android. The Error looks like this following React-native run-android在:app:processDebugResources上失败 - React-native run-android fail on :app:processDebugResources 任务':app:processDebugResources'的执行失败 - React Native - Execution failed for task ':app:processDebugResources' - React Native 运行 react-native run-android 时任务 ':app:transformClassesWithDexForDebug' 执行失败 - Execution failed for task ':app:transformClassesWithDexForDebug' when running react-native run-android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM