app 使用 uni.chooseLocation 报错 当前运行的基座不包含原生插件[mapSearch]

Open
#6,097 2 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript
Domain
mobile-dev

Research direction

Start by checking the uni.chooseLocation documentation and the Android module configuration for HBuilderX 4.76, then compare the cloud build setup with the Tencent Maps configuration. Reproduce the blank page and mapSearch error in a Vue 2 app; done means location selection opens successfully without the missing native plugin error. The issue omits reproducible steps and key system details, so confirm the setup before tracing further.

Written by the indexing model from the issue text.

Description

问题描述
在项目中调用 uni.chooseLocation 拉起选择地图后页面白屏显示(配置的是 腾讯地图),控制台报错信息如下

Image

项目使通过 hbuilderX 创建,由于项目比较老不敢贸然升级现在使用的 hbuilderx 版本为 4.76,项目代码是 vue2 ,控制台提示需要配置 mapSearch 但是在 安卓模块配置中 没有 mapSearch 选项,打包方式是使用云打包。

复现步骤
[复现问题的步骤]

  1. 启动 '...'
  2. 点击 '....'
  3. 查看

[或者可以直接贴源代码]

预期结果
[使用简洁清晰的语言描述你希望生效的预期结果]

实际结果
[这里请贴上你的报错截图或文字]

系统信息:

  • 发行平台: [如 微信小程序、H5平台、5+ App等]
  • 操作系统 [如 iOS 12.1.2、Android 7.0]
  • HBuilderX版本 [如使用HBuilderX,则需提供 HBuilderX 版本号]
  • uni-app版本 [如使用Vue-cli创建/运行项目,则提供npm run info的运行结果]
  • 设备信息 [如 iPhone8 Plus]

补充信息
[可选]
[根据你的分析,出现这个问题的原因可能在哪里?]

Dominant language
JavaScript
Stars
41.7k
Forks
3.7k
Avg merge
1d 7h
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dcloudio/uni-app

All issues in dcloudio/uni-app

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.