gpt4 book ai didi

java - 将谷歌地图实现为 fragment 后,我在运行 block 中没有收到任何错误,但 fragment 不会在我的设备上显示 map

转载 作者:行者123 更新时间:2023-12-02 09:20:20 25 4
gpt4 key购买 nike

应用程序正常运行......但是当我单击应该调出 map fragment 的图标时,它仍然保留在当前 fragment 上

runtime block ::: /.example.findm: Unsupported class loader
W/.example.findm: Skipping duplicate class check due to unsupported classloader
I/Google Maps Android API: Google Play services client version: 12451000
W/RenderThread: type=1400 audit(0.0:412457): avc: denied { search } for name="battery" dev="sysfs" ino=7011 scontext=u:r:untrusted_app:s0:c174,c256,c512,c768 tcontext=u:object_r:sysfs_batteryinfo:s0 tclass=dir permissive=0
I/Google Maps Android API: Google Play services package version: 19530035
W/.example.findm: Accessing hidden field Ljava/nio/Buffer;->address:J (light greylist, reflection)
I/.example.findm: The ClassLoaderContext is a special shared library.

image of run time display

这是我的应用程序代码的 git 链接 https://github.com/wisdom3541/findme

最佳答案

您在 menu.java 中的 onNavigationItemSelected 方法中的 switch case R.id.location 中缺少 break ,这就是应用程序跳过位置并直接转到 case R.id.add_friends 的原因。

添加中断后:

case R.id.location:
getSupportFragmentManager().beginTransaction().replace(R.id.frag_cont, new currentlocation()).commit();
break;

您的 map Activity 在选择后启动时不会出现问题。希望这可以帮助! :)

关于java - 将谷歌地图实现为 fragment 后,我在运行 block 中没有收到任何错误,但 fragment 不会在我的设备上显示 map ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58735410/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com