Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

getImageSource error in android materialSymbol is not working

未关闭
#507 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
活跃
技术栈
android, react-native, typescript
领域
mobile

调研方向

从 getImageSource 入口点开始,在 Android 上复现所提供的 Tab.Screen 配置,并将其与正常工作的 iOS sfSymbol 情况进行比较。跟踪 materialSymbol 选项—name、variant 和 weight—的处理方式;当 Android 标签图标能够在没有报告的错误的情况下渲染时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug
Before submitting a new issue
  • I tested using the latest version of the library, as the bug might be already fixed.
  • I tested using a supported version of react native.
  • I checked for possible duplicate issues, with possible answers.
Bug summary

I tested in ios it is working sf symbol but in android it throws error

Image
Library version

0.84.1

Environment info
info Fetching system and libraries information...
System:
  OS: macOS 26.3.1
  CPU: (8) arm64 Apple M2
  Memory: 99.41 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 25.8.1
    path: /opt/homebrew/bin/node
  Yarn: Not Found
  npm:
    version: 11.11.0
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2026.03.16.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /Users/monilraycha/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 25.2
      - iOS 26.2
      - macOS 26.2
      - tvOS 26.2
      - visionOS 26.2
      - watchOS 26.2
  Android SDK: Not Found
IDEs:
  Android Studio: 2025.3 AI-253.30387.90.2532.14935130
  Xcode:
    version: 26.3/17C529
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.18
    path: /usr/bin/javac
  Ruby:
    version: 3.2.2
    path: /Users/monilraycha/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.1.0
    wanted: 20.1.0
  react:
    installed: 19.2.3
    wanted: 19.2.3
  react-native:
    installed: 0.84.1
    wanted: 0.84.1
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: true
Steps to reproduce
   <Tab.Screen
    name="Home"
    component={Home}
    // options={{ tabBarImage: { systemName: 'house.fill' } }}
    options={{
      tabBarIcon: Platform.select({
        ios: {
          type: 'sfSymbol',
          name: 'house',
        },
        android: {
          type: 'materialSymbol',
          name: 'home',
          variant: 'filled',  // ← required
          weight: 400,
        },

        default:{
          type:'materialSymbol',
          name:'home',
          variant: 'filled',  // ← required
    weight: 400,
        }
      }),
    }}
  />
Reproducible sample code
<Tab.Screen
        name="Home"
        component={Home}
        // options={{ tabBarImage: { systemName: 'house.fill' } }}
        options={{
          tabBarIcon: Platform.select({
            ios: {
              type: 'sfSymbol',
              name: 'house',
            },
            android: {
              type: 'materialSymbol',
              name: 'home',
              variant: 'filled',  // ← required
              weight: 400,
            },

            default:{
              type:'materialSymbol',
              name:'home',
              variant: 'filled',  // ← required
        weight: 400,
            }
          }),
        }}
      />
主要语言
TypeScript
星标
1.5k
派生
110
平均合并
2 天 18 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

callstack/react-native-bottom-tabs 的其他 Issue

查看 callstack/react-native-bottom-tabs 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。