首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行npm react-native run-android时发生突然错误。任务:应用程序:processDebugResources失败

运行npm react-native run-android时发生突然错误。任务:应用程序:processDebugResources失败
EN

Stack Overflow用户
提问于 2021-05-13 13:31:25
回答 1查看 275关注 0票数 0

我突然收到一个错误,说任务':app:processDebugResources‘执行失败。是否存在从C:\Users\prabh\AppData\Local\Temp\gradle13962421950392783403.bin偏移量114265中的二进制存储读取数据的问题?是的,我认为这个错误与react本地firebase有关。我使用的是react-native-firebase/app、firebase/auth、firebase/messaging包。我使用这些软件包已经很长时间了,但以前从来没有遇到过问题。在得到这个错误前几个小时,我做的唯一一件事就是修复一些漏洞的npm审计修复。有谁遇到过类似的错误吗?

build.gradle依赖关系:

代码语言:javascript
复制
    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'
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-05-14 23:23:27

我在Windows10和安卓系统上都能用。我没有在Mac或Linux上尝试过。我在https://github.com/gradle/gradle/issues/8489 @jack7891上看到了谢谢你,jack。类路径'com.google.gms:google-services:4.3.5'的android/build.gradle classpath 'com.google.gms:google-services:4.3.4'

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

package.json

代码语言:javascript
复制
 "@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",

代码语言:javascript
复制
 "@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",

然后运行npm installyarn install

之后,进入android项目文件夹并运行:

代码语言:javascript
复制
./gradlew.bat clean

最后,您可以转到项目文件夹并运行npx react-native run-android

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67514321

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档