我正在使用地点选择器,实际上我是从 here 下载的项目.我试过了。我想从事地理围栏方面的工作。但我没有找到如何先在 map 上搜索位置的方法。为此,我开始了解 Place Picker。自 2019 年 1 月 1 日起已弃用,但仍可使用。
所以我下载了它。我在谷歌开发者控制台中有一个项目,我在项目中为我的 map 创建了该项目。所以我启用了 places api,并使用了相同的 API key
我的问题: 我使用了相同的 API key ,但地点选择器显示并消失了。我创建了另一个 API key 但没有用。
我搜索了这个问题并了解了一些常见错误,但我没有这些错误,因为这个项目已经设置好了。所以我不知道问题出在哪里,也没有任何日志。
在我的 list 中,您可以在此处看到它。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.delaroystudios.locationgeo">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIzaSyA5-VuAgljw6b3IZiUXnrWGIyQ7vSTQlrA" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity android:name="com.delaroystudios.locationgeo.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<provider
android:name="com.delaroystudios.locationgeo.provider.PlaceContentProvider"
android:authorities="com.delaroystudios.locationgeo"
android:exported="false"/>
</application>
</manifest>
所以它看起来很酷,而且似乎没有任何错误。
请帮我看看是什么问题?
最佳答案
请注意,地点选取器已于 2019 年 1 月 29 日弃用。此功能将于 2019 年 7 月 29 日关闭,并且在该日期之后将不再可用。请注意,在弃用期间,只有使用 Places SDK for iOS/Android 的老用户仍然可以使用 Place Picker。两个平台的 Places SDK 的使用现在都通过启用 Places API并且不再支持使用 Place Picker。
Google 正在对促使用户使用 Place Picker 的因素进行审查,如果您有兴趣,请将您的答案添加到此 issue 中提到的表格中.
关于android - Place Picker 不工作并消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56098586/