打开`android/app/src/main/java/[…]/MainApplication.java
添加 new SvgPackage()
setting.gradle中添加
include ‘:react-native-svg’
project(’:react-native-svg’).projectDir = new File(rootProject.projectDir, ‘…/node_modules/react-native-svg/android’)
build.gradle中添加依赖
implementation project(’:react-native-svg’)
按上述步骤成功解决报错,希望可以帮到再次遇到的朋友