我在 Android Studio 的 Logcat 中收到数百条警告消息,但我不知道是什么原因导致此消息。
Too many Flogger logs received before configuration. Dropping old logs.
Run Code Online (Sandbox Code Playgroud)
作为信息消息进行过滤,我还收到数百条这样的消息:
I/Counters: exceeded sample count in FrameTime
Run Code Online (Sandbox Code Playgroud)
有谁知道导致这些消息的原因以及如何解决问题?
我的应用程序有1.5万个标记,通过标记聚类显示.
实际上它使用默认标记工作正常,但我想使用矢量位图和渲染标记与文本(加油站的价格),如下所示:
在完成渲染标记之前,会发生以下异常:"无法分配dup blob fd."
我认为这是某种内存溢出,但我不知道如何解决它.有没有人知道如何解决这个问题或有另一个如何管理这么多标记的建议?
注意:我已经在使用标记聚类.
注意:仅在某些Motorola和LG设备上出现此问题.在大多数设备工作正常.一些代码:
public class OwnRendring extends DefaultClusterRenderer<MyItem> {
public OwnRendring(Context context, GoogleMap map, ClusterManager<MyItem> clusterManager) {
super(context, map, clusterManager);
}
protected void onBeforeClusterItemRendered(MyItem item, MarkerOptions markerOptions) {
markerOptions.snippet(item.getSnippet());
markerOptions.title(item.getTitle());
markerOptions.anchor(0.33f, 1f);
markerOptions.infoWindowAnchor(0.33f,0f);
int cor;
if (item.getPublico()) {
cor=cfgCorPostoPublico;
} else {
cor=cfgCorPostoPrivado;
}
String preço = item.getTitle().substring(item.getTitle().length() - 5);
if (Objects.equals(preço, "0,000")) { preço=""; }
Bitmap bitmap = createStoreMarker(preço, cor);
markerOptions.icon(BitmapDescriptorFactory.fromBitmap(bitmap));
super.onBeforeClusterItemRendered(item, markerOptions);
}
protected boolean shouldRenderAsCluster(Cluster cluster) {
// if markers < cfgClusterMin …Run Code Online (Sandbox Code Playgroud)