我尝试将播放服务更新为8.3.这是我改变的:
在根gradle文件中:
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0-beta1'
classpath 'com.google.gms:google-services:1.5.0-beta2'
}
Run Code Online (Sandbox Code Playgroud)
并在app gradle文件中:
compile 'com.google.android.gms:play-services-maps:8.3.0'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile 'com.google.android.gms:play-services-base:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
compile 'com.google.android.gms:play-services-analytics:8.3.0'
compile 'com.google.android.gms:play-services-appinvite:8.3.0'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.google.android.gms:play-services-appindexing:8.3.0'
Run Code Online (Sandbox Code Playgroud)
它正在构建正常,但它在启动时崩溃,具有以下堆栈跟踪:
11-06 17:30:17.460 2895-2895/app.example.debug E/AndroidRuntime: java.lang.RuntimeException: Unable to get provider com.google.android.gms.measurement.AppMeasurementContentProvider: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.measurement.AppMeasurementContentProvider" on path: DexPathList[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/app.example.debug-1/base.apk"],nativeLibraryDirectories=[/data/app/app.example.debug-1/lib/arm, /vendor/lib, /system/lib]]
11-06 17:30:17.460 2895-2895/app.example.debug E/AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5156)
11-06 17:30:17.460 2895-2895/app.example.debug E/AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:4748)
11-06 17:30:17.460 2895-2895/app.example.debug E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4688)
11-06 17:30:17.460 2895-2895/app.example.debug E/AndroidRuntime: at android.app.ActivityThread.-wrap1(ActivityThread.java)
11-06 17:30:17.460 2895-2895/app.example.debug …Run Code Online (Sandbox Code Playgroud)