Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
T treasure
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FE
  • treasure
  • Issues
  • #133

Closed
Open
Created Feb 27, 2023 by 赵雪飞@snowflyDeveloper

RN-Android混合开发-引入 "react-native-picker" 编译失败

描述: "react-native-picker" "version": "4.3.7" 这个库编译报错:程序包android.support.annotation不存在

-native/node_modules/react-native-picker/android/src/main/java/com/beefe/picker/PickerViewModule.java:9: 
错误: 程序包android.support.annotation不存在
import android.support.annotation.Nullable;

解决: 1. node_modules中找到类 找到android文件夹 找到对应的类

2. 删除 @Nullable注解 ,删除 import android.support.annotation.Nullable引用

其他解决方式:

1. 也可以 改成引用import androidx.annotation.NonNull, 再导入androidx
Edited Mar 02, 2023 by 赵雪飞
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking