hewz / cordova-baidu-location Goto Github PK
View Code? Open in Web Editor NEWCordova/ionic 百度定位Android插件 v7.2
License: MIT License
Cordova/ionic 百度定位Android插件 v7.2
License: MIT License
Success for the first time but success for the second time 5e-324
安装完plugin以后,调用baidu_location报错,是不是需要有些配置readme里面没有说?
找不到baidu_location,同时在android目录里也看不到插件的文件夹
能否添加android6.0以上权限获取的代码?
刚开始获取位置信息返回的结果是网络定位,使用watchPosition后返回的位置是GPS定位,请问这个要怎么解决?
直接使用 baidu_location 提示未定义
github在国内时常被干扰。导致在ci流水线add插件的时候经常会失败。
不知道作者是否考虑下把插件build好直接推送至npm仓库呢?
Discovered plugin "com.hewz.plugins.baidu.location" in config.xml. Adding it to the project
Fetching plugin "https://github.com/hewz/cordova-baidu-location" via git clone
Failed to restore plugin "com.hewz.plugins.baidu.location" from config.xml. You might need to try adding it again. Error: Failed to fetch plugin https://github.com/hewz/cordova-baidu-location via git.
Either there is a connection problems, or plugin spec is incorrect:
Error: git: Command failed with exit code 128 Error output:
正克隆到 '/tmp/git/1489075662575'...
error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: unpack-objects failed
你好:
当使用你集成的最新版的百度地图Android版定位SDK(v7.2)版本时,对应的Cordova封包时会报错。错误如下:
`:compileDebugJavaWithJavac
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no p revious execution, etc.).
D:\truck\ionic-demo\platforms\android\src\com\hewz\plugins\baidu\BaiduLocation.java:95: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ���
@OverRide
^
ע: ijЩ�����ļ�ʹ�û����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
ע: ijЩ�����ļ�ʹ����δ��������ȫ�IJ�����
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:unchecked ���±��롣
1 ������
:compileDebugJavaWithJavac FAILED
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
BUILD FAILED
Total time: 43.448 secs
Error: cmd: Command failed with exit code 1 Error output:
D:\truck\ionic-demo\platforms\android\src\com\hewz\plugins\baidu\BaiduLocation.java:95: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ���
@OverRide
^
ע: ijЩ�����ļ�ʹ�û����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
ע: ijЩ�����ļ�ʹ����δ��������ȫ�IJ�����
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:unchecked ���±��롣
1 ������
FAILURE: Build failed with an exception.
Compilation failed; see the compiler error output for details.
报错的地方是BaiduLocation.java第95行,看代码怀疑是引用的BaiduLBS_Android.jar中BDLocationListener类的方法发生变化。
还有如果能够找到之前的版本,希望能够给上一个版本打一个版本号的话,这样的话便于使用。
总之,感谢你封装的插件,给我省了不少事情。谢谢了
是在currentPosition基础上加了定时器?还是调用了原生定位监听?
为啥呢
i run the command in ubuntu:
cordova plugin add https://github.com/hewz/cordova-baidu-location --variable API_KEY="myKEY"
it shows:
Error: Failed to fetch plugin
https://github.com/hewz/cordova-baidu-location via registry.
Probably this is either a connection problem, or plugin spec is
incorrect.
Check your connection and plugin name/version/URL.
Failed to get absolute path to installed module
what should i do ?
Android7.1.1,WiFi获取到的address为null
需要执行两次才能获取到定位信息
修改需要获取位置为TRUE可以获取到地理位置
option.setIsNeedAddress(true);
是我加载的顺序有关吗。ionViewDidLoad的时候加载的,还望指教
lontitude: 经度,
0 info it worked if it ends with ok
1 verbose cli [ 'E:\nodejs\node.exe',
1 verbose cli 'C:\Users\xxx\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js',
1 verbose cli 'install',
1 verbose cli 'https://github.com/hewz/cordova-baidu-location',
1 verbose cli '--save' ]
2 info using [email protected]
3 info using [email protected]
4 verbose npm-session
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData error for git+https://github.com/hewz/cordova-baidu-location.git Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
7 silly fetchPackageMetaData C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
7 silly fetchPackageMetaData C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
7 silly fetchPackageMetaData C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 19: .: git-sh-setup: file not found
8 verbose stack Error: Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
8 verbose stack C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
8 verbose stack C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
8 verbose stack C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 19: .: git-sh-setup: file not found
8 verbose stack
8 verbose stack at ChildProcess.exithandler (child_process.js:206:12)
8 verbose stack at emitTwo (events.js:106:13)
8 verbose stack at ChildProcess.emit (events.js:191:7)
8 verbose stack at maybeClose (internal/child_process.js:877:16)
8 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
9 verbose cwd C:\Users\Roronoazoro\lj3\node_modules
10 verbose Windows_NT 10.0.15063
11 verbose argv "E:\nodejs\node.exe" "C:\Users\Roronoazoro\AppData\Roaming\npm\node_modules\npm\bin\npm-cli.js" "install" "https://github.com/hewz/cordova-baidu-location" "--save"
12 verbose node v6.9.5
13 verbose npm v5.3.0
14 error code 1
15 error Command failed: C:\Program Files\Git\cmd\git.EXE submodule update -q --init --recursive
15 error C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: basename: command not found
15 error C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 7: sed: command not found
15 error C:\Program Files\Git\mingw64/libexec/git-core\git-submodule: line 19: .: git-sh-setup: file not found
16 verbose exit [ 1, true ]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.