草庐IT

location-provider

全部标签

android - "provided"范围不工作 - android studio with gradle

我需要阻止gradle导出某个共享库。我读到过使用提供的范围应该可以解决问题,但它似乎只适用于较旧的gradle版本。是否有任何其他方法可以从构建过程中排除依赖项,以免它们进入最终的apk? 最佳答案 我在这里找到了解决方案:https://stackoverflow.com/a/10406184/310760但是对于Gradle2.0它有一些小的变化:configurations{provided}sourceSets{main{compileClasspath+=configurations.provided}test{comp

android - Glide : get cached file location in Android/Java

我正在使用Glide在我的应用程序中显示图像。现在我想知道Glide存储从url下载的缓存图像的位置。我正在使用下面的代码来显示图像。Glide.with(mContext).load(mData.get(position).getImage()).centerCrop().override(300,300).placeholder(R.drawable.default_small).diskCacheStrategy(DiskCacheStrategy.SOURCE).into(holder.ivCapturedImage); 最佳答案

android - import com.google.android.gms.location.LocationClient无法解析

这个问题在这里已经有了答案:Androidplayservices6.5:LocationClientismissing(1个回答)关闭7年前。我遇到了这个编译错误。我在同一工作区中添加了googleplay服务库。然后成功添加了最新的sdk(tools,extras)。但不知道为什么还是会出现这个错误。importcom.google.android.gms.location.LocationClient;-->importcannotberesolvedpublicclassMainextendsActivityimplementsGooglePlayServicesClient.

JCE cannot authenticate the provider BC因jdk版本引起的加密包报错

JCRCausedby:java.util.jar.JarException:jar:file:/app/xscloud/xs-system.jar!/BOOT-INF/lib/bcprov-jdk14-138.jar!/hasunsignedentries-org/bouncycastle/LICENSE.classCausedby:cn.hutool.crypto.CryptoException:SecurityException:JCEcannotauthenticatetheproviderBC atcn.hutool.crypto.SecureUtil.createCipher(Se

android - ACCESS_COARSE_LOCATION 从 play-services-base lib 合并

我正在使用AndroidStudio构建我的项目,在查看manifest-merger-debug-report.txt文件后,我看到以下权限已添加到我的list中:ADDEDfromcom.google.android.gms:play-services-base:7.5.0:22:13uses-permission#android.permission.ACCESS_COARSE_LOCATION似乎play-serviceslib将ACCESS_COARSE_LOCATION权限合并到我的list中。我正在使用播放服务以在我的库(play-services-gcm)中支持GCM。

Sqlserver遇到TCP Provider An existing connection was forcibly closed by the remote host的解决方法

报错TCPProvider:Anexistingconnectionwasforciblyclosedbytheremotehost如下图,在dwprod2(服务器名dbprod96)服务器执行远程调用dbprod4\datamart服务器的job报错TCPProvider:Anexistingconnectionwasforciblyclosedbytheremotehost这类错误在官方文档里面有记录https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/connect/tls-exist-connection-

android - 从 Location.distanceBetween() 返回的初始方位角的比例是多少

当调用Location.distanceBetween()并获取初始和最终方位角时,方位角的比例是多少?我得到负值,这对我来说没有意义。方位角从0度到360度(相对或绝对,无关紧要)。我唯一能想到的是N到E到S是0到180度,N到W到S是0到-180度。有人可以阐明这一点吗? 最佳答案 正如您已经得出的结论:在功能描述中,提到了真北以东度数。真北是地理上的,与地磁(南磁极)确定的北方有所不同。因此,如果您向东移动,则方位角为90度;如果您向南移动,则方位角为+180或-180;如果您向西移动,则方位角为-90度。

android - navigator.geolocation.GetCurrentPosition 抛出 "The last location provider was disabled"错误

我正在尝试创建一个非常基本的HTML5页面来获取地理位置,但出现错误。这是我的“脚本”标签中的内容:functionGetGeo(){if(!navigator.geolocation){alert("Couldnotfindgeolocation");}else{navigator.geolocation.getCurrentPosition(showMap,function(error){alert("errorencountered:"+error.message);});}}functionshowMap(position){window.alert(position.coor

android - 为什么 Location.distanceBetween 会为结果参数抛出异常?

为什么Location.distanceBetween抛出以下示例的异常:Location.distanceBetween(51.5175431381974,-0.1501073187713473,51.5173695544231,-0.15127676190184,results);我检查了相同的定位here距离报告为0.08319公里,我不确定为什么会抛出异常:java.lang.IllegalArgumentException:resultsisnullorhaslength 最佳答案 您的结果变量需要初始化为长度>0的flo

Android Location Listener 调用非常频繁

我正在使用网络位置提供商。我需要每1小时从我的LocationListener调用一次onLocationChanged方法。这是我的代码:MyLocationListenerlocationListener=newMyLocationListener();locationMangaer.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,3600000,0,locationListener);但它不起作用。我的onLocationChanged调用非常频繁。我必须使用哪些参数? 最佳答案