我正在努力使我的應用與Android Instant Apps SDK 1.0.0兼容。我的常規app
模塊運行良好,Google地圖沒有問題,或者我找到的任何其他問題。但是,每當我嘗試測試即時應用程序模塊時,只要地圖嘗試初始化,應用程序就會崩潰。有沒有人看到這個或知道可以做些什麼來解決它?即時應用在啓動Google地圖時崩潰
06-20 11:10:57.263 13891-13891/com.myapp.example.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.myapp.example.debug, PID: 13891
java.lang.SecurityException: Failed to find provider com.google.android.gsf.gservices for user 0; expected to find a valid ContentProvider for this authority
這是我對appia
模塊
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.22.2'
}
}
apply plugin: 'com.android.instantapp'
apply plugin: 'io.fabric'
repositories {
jcenter()
flatDir {
dirs '../libs'
}
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
}
android {
compileSdkVersion rootProject.compileSdk
buildToolsVersion rootProject.buildTools
defaultConfig {
minSdkVersion rootProject.minSdk
targetSdkVersion rootProject.compileSdk
}
buildTypes {
release {}
debug {}
}
flavorDimensions rootProject.flavorDimensions
productFlavors {
internal {
dimension rootProject.flavorDimensions
}
external {
dimension rootProject.flavorDimensions
}
}
}
dependencies {
implementation project(':features:base')
implementation project(':features:auth')
implementation project(':features:lead')
implementation project(':features:chat')
implementation project(':features:search')
我不擔心在https://github.com/googlemaps/android-samples上將Google地圖示例轉換爲即時應用程序。你在哪個設備上運行? – ibrahimkarahan
你是否編譯'.... play-services ...'? – Dennis
請在更新到最新的庫之後再試一次,目前版本爲11.0.4 https://developers.google.com/android/guides/releases(相關:https://stackoverflow.com/questions/45089070/instant-app-崩潰在adview-loadad-securityexception-無法找到提供) – TWL