React-native-svg: Execution failed for task ':app:compileDebugJavaWithJavac'.

Created on 12 Sep 2018  ·  3Comments  ·  Source: react-native-svg/react-native-svg

:app:compileDebugJavaWithJavac
C:\Users\Administrator\Desktop\react native 8.1git_BDX\BDX\android\app\src\main\java\com\bdx\MainApplication.java:6: 错误: 程序包com.horcrux.svg不存在
import com.horcrux.svg.SvgPackage;
^
C:\Users\Administrator\Desktop\react native 8.1git_BDX\BDX\android\app\src\main\java\com\bdx\MainApplication.java:28: 错误: 找不到符号
new SvgPackage(),
^
符号: 类 SvgPackage
2 个错误
Incremental compilation of 1 classes completed in 0.521 secs.
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

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

All 3 comments

Try:
react-native unlink react-native-svg
and then:
react-native link react-native-svg

你是怎么解决的,我还是不行

我是已经解决了,你遇到什么问题

------------------ 原始邮件 ------------------
发件人: "dragon of china"notifications@github.com;
发送时间: 2018年11月1日(星期四) 上午10:13
收件人: "react-native-community/react-native-svg"react-native-svg@noreply.github.com;
抄送: "于诚"871231640@qq.com; "Author"author@noreply.github.com;
主题: Re: [react-native-community/react-native-svg] Execution failed fortask ':app:compileDebugJavaWithJavac'. (#775)

你是怎么解决的,我还是不行


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings