Android 样式/位置用于完成新Google Place picker中未找到的最小覆盖
格雷德尔先生 功能模块清单 我不明白这个问题Android 样式/位置用于完成新Google Place picker中未找到的最小覆盖,android,googleplacesautocomplete,google-place-picker,Android,Googleplacesautocomplete,Google Place Picker,格雷德尔先生 功能模块清单 我不明白这个问题 提前谢谢 实现'com.google.android.libraries.places:places:2.0.0' 将此添加到你的应用程序模块gradle中。这不是一个合适的解决方案,但似乎解决了问题。我希望谷歌发布一个新版本的修复程序。你能添加你的清单吗?@XaviJimenez我刚刚添加了清单谢谢,已经用同样的方式修复了,我会接受这个答案,因为它对我有效。 dependencies { implementation 'com.google
提前谢谢 实现'com.google.android.libraries.places:places:2.0.0'
将此添加到你的应用程序模块gradle中。这不是一个合适的解决方案,但似乎解决了问题。我希望谷歌发布一个新版本的修复程序。你能添加你的清单吗?@XaviJimenez我刚刚添加了清单谢谢,已经用同样的方式修复了,我会接受这个答案,因为它对我有效。
dependencies {
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.google.android.libraries.places:places:2.0.0'
}
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
xmlns:tools="http://schemas.android.com/tools"
package="com.demo.app">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<dist:module
dist:instant="false"
dist:onDemand="false"
dist:title="@string/title_feature_module">
<dist:fusing dist:include="true" />
</dist:module>
<application>
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<meta-data
android:name="com.google.android.gms.version"
android:value="12451000"
tools:replace="android:value" />
<activity android:name=".presenter.MainActivity">
<intent-filter>
<action android:name="action.demo.open" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".presenter.map.MapsActivity"
android:label="@string/title_activity_maps" />
<service
android:name=".service.FetchAddressIntentService"
android:exported="false" />
</application>
private fun startAutocompleteActivity() {
val fields = listOf(
Place.Field.ADDRESS,
Place.Field.ADDRESS_COMPONENTS,
Place.Field.ID,
Place.Field.LAT_LNG,
Place.Field.NAME
)
if (!Places.isInitialized())
Places.initialize(applicationContext, getString(R.string.google_maps_key))
val intentPlacePicker = Autocomplete.IntentBuilder(AutocompleteActivityMode.FULLSCREEN, fields)
.build(this)
startActivityForResult(intentPlacePicker, KeyUtils.REQUEST_PLACE_PICKER)
}
Android resource linking failed
/app/build/intermediates/merged_manifests/mockDebug/AndroidManifest.xml:98: error: resource string/places_autocomplete_label (aka com.demo.app.mock:string/places_autocomplete_label) not found.
/app/build/intermediates/merged_manifests/mockDebug/AndroidManifest.xml:98: error: resource style/PlacesAutocompleteThemeOverlay (aka com.demo.app.mock:style/PlacesAutocompleteThemeOverlay) not found.
error: failed processing manifest.