启动Google地图时,即时应用会崩溃

时间:2017-06-20 15:32:34

标签: android google-maps android-instant-apps

我正努力让我的应用程序与Android Instant Apps SDK 1.0.0兼容。我的常规app模块工作正常,Google地图没有任何问题,或者我发现的任何其他问题。但是,每当我尝试测试Instant 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')

1 个答案:

答案 0 :(得分:0)

Identify tested compatible libraries

支持即时应用程序的库。

  • Google Play服务位置API
  • Google Maps API

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

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