首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >>任务:react-native-reanimated:compileDebugJavaWithJavac失败

>任务:react-native-reanimated:compileDebugJavaWithJavac失败
EN

Stack Overflow用户
提问于 2020-08-11 12:41:43
回答 3查看 3.2K关注 0票数 0

折叠式误差

C:\Users\projectname\node_modules\react-native-reanimated\android\src\main\java\com\swmansion\reanimated\NodesManager.java:171:错误:找不到新符号GuardedRunnable(mContext.getExceptionHandler()) {^符号:方法getExceptionHandler()

以下是版本

代码语言:javascript
复制
"react-native-reanimated": "^1.4.0",
"react": "16.8.6",
"react-native": "0.60.3",

我是新的反应,土生土长,一切工作正常,但突然得到了这个错误,我正在努力修复,请建议,如果有任何解决办法,这或根本原因。

如果需要更多的信息,请告诉我。

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2020-08-12 11:34:39

我今天也收到了同样的错误,我所做的修正是

替换

代码语言:javascript
复制
new GuardedRunnable(mContext.getExceptionHandler())

代码语言:javascript
复制
new GuardedRunnable(mContext)

试着看看这对你有用吗。

票数 2
EN

Stack Overflow用户

发布于 2020-08-12 14:51:50

如果您使用的是react-本机0.59,则将react-native-reanimated升级到'v1.13.0'

他们解决了一个问题:https://github.com/software-mansion/react-native-reanimated/issues/1109

票数 1
EN

Stack Overflow用户

发布于 2022-11-06 11:58:52

此问题是由于react本机版本的升级造成的。要解决这个问题,请访问android/build.gradle,并通过下面给出的代码:

代码语言:javascript
复制
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    // ...
}


allprojects {
    repositories {
+       exclusiveContent {
+           // We get React Native's Android binaries exclusively through npm,
+           // from a local Maven repo inside node_modules/react-native/.
+           // (The use of exclusiveContent prevents looking elsewhere like Maven Central
+           // and potentially getting a wrong version.)
+           filter {
+               includeGroup "com.facebook.react"
+           }
+           forRepository {
+               maven {
+                   url "$rootDir/../node_modules/react-native/android"
+               }
+           }
+       }
        // ...
    }
}

您还可以访问:https://github.com/facebook/react-native/issues/35210

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

https://stackoverflow.com/questions/63358372

复制
相关文章

相似问题

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