为什么我的react-native-vector-icons无法正常显示?这发生在SDK版本30到32上,33是唯一正常工作的版本。
下面是我的Android项目中SDK版本的详细信息
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "21.4.7075529"
}
...
}
package.json
"react-native-vector-icons": "^9.2.0"
"react": "18.2.0"
"react-native": "^0.69.1"
我尝试过这种方法,但仍然失败
app/build.gradle
apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"
settings.gradle
include ':react-native-vector-icons'
project(':react-native-vector-icons').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-vector-icons/android')
我也尝试了各种方法,如降级的图标库,./gradlew clean
和运行android,但仍然没有什么好的来了,任何人都有想法如何解决这个问题?
1条答案
按热度按时间vkc1a9a21#
你试过“@expo/vector-icons”、'react-native-vector-icons/MaterialCommunityIcons';我认为你使用的图标图标,但没有更新更改的错误日志。