gpt4 book ai didi

android - 如何解决 `PlaceAutocompleteFragment`?

转载 作者:IT老高 更新时间:2023-10-28 23:02:11 24 4
gpt4 key购买 nike

如何解决PlaceAutocompleteFragment

我正在尝试使用新的 PlaceAutocompleteFragment。我尝试使用以下代码:

<fragment
android:id="@+id/place_autocomplete_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
/>

此代码示例只是一个副本。来自这里site .但是 PlaceAutocompleteFragment 在我的情况下没有解决。我该如何解决这个问题?我认为解决方案一定很简单。不过我找了好久。

最佳答案

PlaceAutocompleteFragment的使用我们需要在gradle中添加一个lib添加这个

implementation 'com.google.android.gms:play-services-places:16.0.0'

在您的 Android 应用程序的 gradle 中。我已经在我的 Android 工作室中检查了这一点。如果您的问题得到解决,请告诉我。

检查播放服务的版本(撰写本文时为 16.0.0)here .
(来自下面的评论)

关于android - 如何解决 `PlaceAutocompleteFragment`?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34635963/

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