2017-06-20 43 views
1

我正在努力使我的应用与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') 
+0

我不担心在https://github.com/googlemaps/android-samples上将Google地图示例转换为即时应用程序。你在哪个设备上运行? – ibrahimkarahan

+0

你是否编译'.... play-services ...'? – Dennis

+1

请在更新到最新的库之后再试一次,目前版本为11.0.4 https://developers.google.com/android/guides/releases(相关:https://stackoverflow.com/questions/45089070/instant-app-崩溃在adview-loadad-securityexception-无法找到提供) – TWL

回答

0

Identify tested compatible libraries

以下支持即时的应用程序库的build.gradle。

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

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

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

+0

我们已经做到了。我们实际上正在与您的开发团队合作解决这个问题。我星期二收到了一封支持邮件,确认他们发现了这个问题并正在努力解决这个问题。 该问题仍然存在于11.6.0。 – RyanInBinary

+0

是的,如果您分享有关测试平台和环境的完整详细信息以获得更多理解,那将会很棒。我希望它在8.0的问题。谢谢。 –