当我输入位置时 它没有显示(起点和终点)的路线:
这些是日志:
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void libcore.io.Linux.connect(java.io.FileDescriptor, java.net.InetAddress, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void libcore.io.Linux.connect(java.io.FileDescriptor, java.net.InetAddress, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void libcore.io.Linux.connect(java.io.FileDescriptor, java.net.InetAddress, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void libcore.io.Linux.connect(java.io.FileDescriptor, java.net.InetAddress, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method java.net.InetAddress[] libcore.io.Linux.android_getaddrinfo(java.lang.String, android.system.StructAddrinfo, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
W/zygote64: Got a deoptimization request on un-deoptimizable method void java.lang.Thread.sleep(java.lang.Object, long, int)
I/zygote64: Do full code cache collection, code=0B, data=120KB
I/zygote64: After code cache collection, code=0B, data=0B
答案 0 :(得分:0)
为使我们更好地为您提供帮助,您需要提供到目前为止您尝试过的内容或无效代码的详细信息。
通常,如果您需要打开一个地图,该地图显示从A点到B点的方向,这是一个有效的代码。
Uri.Builder directionsBuilder = new Uri.Builder()
.scheme("https")
.authority("www.google.com")
.appendPath("maps")
.appendPath("dir")
.appendPath("")
.appendQueryParameter("api", "1")
.appendQueryParameter("destination", latitude + "," + longitude);
startActivity(new Intent(Intent.ACTION_VIEW, directionsBuilder.build()));