1

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

这是我的 build.gradleappia模块

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

1 回答 1

0

识别经过测试的兼容库

即时应用程序支持以下库。

  • Google Play 服务位置 API
  • 谷歌地图 API

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

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

于 2018-01-06T22:19:11.010 回答