即时应用程序在启动谷歌地图时崩溃



我正在努力让我的应用程序与 Android Instant Apps SDK 1.0.0 兼容。我的常规app模块工作得很好,谷歌地图没有问题,也没有我发现的任何其他问题。但是,每当我尝试测试即时应用程序模块时,一旦地图尝试初始化,应用程序就会崩溃。有没有人看到这个或知道可以做些什么来解决它?

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 模块的 build.gradle

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')

识别经过测试的兼容库

免安装应用支持的以下库。

  • 谷歌播放服务位置接口
  • 谷歌地图接口

始终确保您使用的是最新的库版本。

请更新到最新版本,目前是 11.6.0。

最新更新