简体   繁体   English

除非您更新Google Play服务,否则com.tools.fd.runtime.BootstrapApplication将无法运行

[英]com.tools.fd.runtime.BootstrapApplication won't run unless you update Google Play services

I try to make a button (in my case, ImageButton) which will spot user's location on the Google Map. 我尝试制作一个按钮(在我的例子中是ImageButton),它会在谷歌地图上找到用户的位置。 I've done this so far and when I press the button in the application simulator shows; 到目前为止我已经完成了这个,当我按下应用程序模拟器中的按钮时显示; "com.tools.fd.runtime.BootstrapApplication won't run unless you update Google Play services". “除非您更新Google Play服务,否则com.tools.fd.runtime.BootstrapApplication将无法运行”。 Here is my code: 这是我的代码:

built.gradle built.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "25.0.0"

defaultConfig {
    applicationId "com.example.konarx.a11042016"
    minSdkVersion 14
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.android.gms:play-services:9.8.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-maps:9.8.0'
}

MapsActivity.class MapsActivity.class

package com.example.konarx.a11042016;

import android.os.Bundle;

import com.google.android.gms.maps.CameraUpdateFactory;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.MarkerOptions;

public class MapsActivity extends MainScreen implements OnMapReadyCallback {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_maps);
    SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
            .findFragmentById(R.id.map);
    mapFragment.getMapAsync(this);
}

@Override
public void onMapReady(GoogleMap googleMap) {
    mMap = googleMap;

    LatLng sydney = new LatLng(-34, 151);
    mMap.addMarker(new MarkerOptions().position(sydney).title("Marker in Sydney"));
    mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));
}
}

I just faced the same problem. 我刚遇到同样的问题。

In your build.gradle, downgrade the version of play services to 9.6.0 在build.gradle中,将播放服务的版本降级到9.6.0

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.google.android.gms:play-services:9.6.0'
    testCompile 'junit:junit:4.12'
}

I was using Nougat (API 25) when this happened to me. 当我遇到这种情况时,我正在使用Nougat(API 25)。 Using a different API package (I ended up using Marshmallow API 23 on a new emulator) fixed it for me. 使用不同的API包(我最终在新的模拟器上使用Marshmallow API 23)为我修复了它。 I was using play services version 10.0.1 in my project, and downgrading my play services version wasn't an option since Firebase required 10.0.1. 我在我的项目中使用了Play服务版本10.0.1,并且降级我的播放服务版本不是一个选项,因为Firebase需要10.0.1。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 除非您更新Google Play服务,否则此应用无法运行 - This app won't run unless you update Google Play Services 使用Google Maps API“除非您更新Google Play服务,否则应用程序将无法运行” - “App won't run unless you update Google Play services” with Google Maps API AndroidStudio 模拟器“除非您更新 Google Play 服务,否则不会运行” - AndroidStudio emulator "won't run unless you update Google Play Services" 无法实例化应用程序com.android.tools.fd.runtime.BootstrapApplication - Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication Android Studio 2.0更新 - public static volatile com.android.tools.fd.runtime.IncrementalChange - Android Studio 2.0 update - public static volatile com.android.tools.fd.runtime.IncrementalChange Eclipse Java Android-如果没有Google Play服务,此应用将无法运行 - Eclipse Java Android - This app won't run without Google Play Services 获取错误“java.lang.NoClassDefFoundError:com.android.tools.fd.runtime.AppInfo” - Getting Error “java.lang.NoClassDefFoundError: com.android.tools.fd.runtime.AppInfo” 引起原因:java.lang.UnsatisfiedLinkError:com.android.tools.fd.runtime.IncrementalClassLoader $ DelegateClassLoader - Caused by: java.lang.UnsatisfiedLinkError: com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader 如何更新com.google android.gms:play-services-auth:16.0.1? - How to update com.google android.gms:play-services-auth:16.0.1? 更新后 - 崩溃com.google.android.gms:play-services:5.2.8 - After update - crash com.google.android.gms:play-services:5.2.8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM