繁体   English   中英

React-Native Android Studio构建失败

[英]React-native android studio Build Failed

当我执行build-> rebuild project时,android studio中的构建失败。 我在下面发布了错误消息。 这很奇怪,因为我没有进行任何更改,我所尝试的只是创建一个新的AVD,而接下来您尝试构建它会导致错误。 现在我无法运行它。 我不愿意尝试一些随机的快速修复方法,因为在我创建新的AVD之前,一切工作都很好。

> Task :app:compileDebugJavaWithJavac FAILED
/Users/waltershub/Desktop/Fluz-Develop/fluzfluz-frontend/fluzclient/android/app/src/main/java/com/fluzclient/MainApplication.java:22: error: cannot find symbol
import io.branch.referral.Branch;
                         ^
  symbol:   class Branch
  location: package io.branch.referral
/Users/waltershub/Desktop/Fluz-Develop/fluzfluz-frontend/fluzclient/android/app/src/main/java/com/fluzclient/MainApplication.java:98: error: cannot find symbol
    Branch.getAutoInstance(this);
    ^
  symbol:   variable Branch
  location: class MainApplication
Note: /Users/waltershub/Desktop/Fluz-Develop/fluzfluz-frontend/fluzclient/android/app/src/main/java/com/fluzclient/MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.0-milestone-1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 19s
409 actionable tasks: 381 executed, 28 up-to-date

分支SDK未正确导入到您的React项目中。

https://docs.branch.io/pages/apps/react-native/

按照YARN安装,在项目中添加依赖项。

暂无
暂无

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

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