【发布时间】:2016-06-30 15:11:59
【问题描述】:
我正在使用 Android Studio 处理一个 Android 项目。
这个项目是一个使用一些第三方库的应用程序。其中一个使用的是 Google Play Services 8.4.0,而我的应用使用的是 Google Play Services 9.2.0,我需要使用这个版本来实现应用的某些特定功能。
当我使用这个依赖项编译和执行应用程序时
编译 'com.google.android.gms:play-services-gcm:9.2.0' 编译'com.google.android.gms:play-services-location:9.2.0'
当我执行应用程序并执行第三方库的代码时,我得到了这个错误(总结):
致命异常:主要 进程:com.example.app,PID:507 java.lang.NoClassDefFoundError:解析失败:Lcom/google/android/gms/maps/model/LatLng; 原因:java.lang.ClassNotFoundException:在路径上找不到类“com.google.android.gms.maps.model.LatLng”:DexPathList
如果我将 Google Play Services 版本降级到 8.4.0,它可以正常工作,但问题是我必须从应用中删除我的应用 Google Play Services 9.2.0 功能。
有没有办法强制第三方库使用其自己的 Google Play 服务库版本并允许我的应用使用最新的 Google Play 服务版本?
【问题讨论】:
-
嗨,我正在使用 myflashlab 上的 play-services-ane 版本 9.6.8 和我的 AIR android 项目 (AIR SDK 24.0)。我收到相同的运行时错误:LatLng 类上的 CalssNotFoundException。你解决了你的问题吗?如果是,请帮我解决这个问题。
标签: android google-play-services