我正在处理一个旧的节点项目,在执行 npm install 时出现错误
节点版本:v13.8.0 Npm 版本:6.14.4 Mac OS 版本:10.15.5
起初,我在重新安装 X-Code 后遇到了已修复的 X-Code 问题。
该问题似乎在 npm 页面上,但没有人回复
> fibers@2.0.2 install /Users/cksharma/projects/step-library/some-library/node_modules/fibers
> node build.js || nodejs build.js
CXX(target) Release/obj.target/fibers/src/fibers.o
../src/fibers.cc:68:2: error: no template named 'Handle'
Handle<String> NewLatin1String(Isolate* isolate, const char* string) {
^
../src/fibers.cc:69:10: error: no viable conversion from returned value of type 'Local<v8::String>' to function return type 'int'
return String::NewFromOneByte(isolate, (const uint8_t*)string, NewStringType::kNormal).ToLocalChecked();
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/fibers.cc:72:2: error: no template named 'Handle'
Handle<String> NewLatin1Symbol(Isolate* isolate, const char* string) …Run Code Online (Sandbox Code Playgroud) 我正在尝试制作一个简单的位置跟踪应用,我尝试了很多方法,但是没有任何效果。我认为onLocationChanged没有被调用。
这是我的代码:
@Override
public void onLocationChanged(Location location) {
Log.d("test", "onLocationChanged Called");
double latitude = location.getLatitude();
double longitude = location.getLongitude();
LatLng latLng = new LatLng(latitude, longitude);
gMap.addMarker(new MarkerOptions().position(latLng));
gMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));
gMap.animateCamera(CameraUpdateFactory.zoomTo(15));
Log.d("location", "Latitude:" + latitude + ", Longitude:" + longitude);
}
Run Code Online (Sandbox Code Playgroud)