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