NoClassDefFoundError:android.support.v4.util.ArrayMap [英] NoClassDefFoundError: android.support.v4.util.ArrayMap

查看:599
本文介绍了NoClassDefFoundError:android.support.v4.util.ArrayMap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在JellyBean上获取此错误:

Getting this error on JellyBean:

01-11 18:26:52.030: E/AndroidRuntime(16517): FATAL EXCEPTION: main
01-11 18:26:52.030: E/AndroidRuntime(16517): java.lang.NoClassDefFoundError: android.support.v4.util.ArrayMap
01-11 18:26:52.030: E/AndroidRuntime(16517):    at com.google.android.gms.common.api.GoogleApiClient$Builder.<init>(Unknown Source)
01-11 18:26:52.030: E/AndroidRuntime(16517):    at com.example.services.LocationService.initGoogleApiClient(LocationService.java:82)
01-11 18:26:52.030: E/AndroidRuntime(16517):    at com.example.services.LocationService.start(LocationService.java:73)

项目仍然使用Eclipse。

The project still uses Eclipse.

关于这个问题有两个问题,解决方法不能帮助我的情况:

There are two questions about this problem, resolved in ways that do not help my case:

使用Android 4.1与ArrayMap的崩溃 - 我无法更改Google在我的情况下崩溃的代码

Crash with Android 4.1 with ArrayMap - I cannot change the Google code that crashes in my case

Android错误 - 导致:java.lang.NoClassDefFoundError:android.support.v4.util.SparseArrayCompat - 它已经被勾选,但没有工作

Android error - Caused by: java.lang.NoClassDefFoundError: android.support.v4.util.SparseArrayCompat - It is already ticked, but doesnt work

推荐答案

通常,关于缺少 android.support 类的问题意味着您有一个较旧的受影响的图书馆的版本,一个从有关的课程之前添加。不幸的是,JavaDocs做的很差,表明哪个版本的支持库添加了更新的类。

Frequently, a problem regarding a missing android.support class means that you have an older version of the affected library, one from before the class in question was added. Unfortunately, the JavaDocs do a poor job of indicating which version of the support libraries added newer classes.

如果您使用的是Android Studio,请确保您的 support - 依赖关系是相当近的,而您的 compileSdkVersion 与依赖关系的主要版本号相匹配。

If you are using Android Studio, make sure that your support- dependencies are fairly recent, and that your compileSdkVersion matches the major version number of the dependency.

如果您使用的是Eclipse,则不仅需要从SDK Manager下载最新的库,还可以从Eclipse项目中删除旧的库,并添加最新的您的SDK安装中的库。

If you are using Eclipse, you will have to not only download the latest libraries from the SDK Manager, but then remove the old library from your Eclipse project and add in an up-to-date copy of the library from your SDK installation.

这篇关于NoClassDefFoundError:android.support.v4.util.ArrayMap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆