异常java.lang.NoClassDefFoundError:pim [英] Exception java.lang.NoClassDefFoundError: pim

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

问题描述

我在崩溃报告中遇到此崩溃:

I get this crash in Crash Reporting:

Exception java.lang.NoClassDefFoundError: pim
pil.<clinit> (SourceFile:2)
pij.onAnimationEnd (SourceFile:10)
android.animation.AnimatorSet$AnimatorSetListener.onAnimationEnd     (AnimatorSet.java:818)
android.animation.ValueAnimator.endAnimation (ValueAnimator.java:1056)
android.animation.ValueAnimator.access$400 (ValueAnimator.java:50)
android.animation.ValueAnimator$AnimationHandler.doAnimationFrame     (ValueAnimator.java:644)
android.animation.ValueAnimator$AnimationHandler.run (ValueAnimator.java:660)
android.view.Choreographer$CallbackRecord.run (Choreographer.java:761)
android.view.Choreographer.doCallbacks (Choreographer.java:574)
android.view.Choreographer.doFrame (Choreographer.java:543)
android.view.Choreographer$FrameDisplayEventReceiver.run     (Choreographer.java:747)
android.os.Handler.handleCallback (Handler.java:733)
android.os.Handler.dispatchMessage (Handler.java:95)
android.os.Looper.loop (Looper.java:136)
android.app.ActivityThread.main (ActivityThread.java:5154)
java.lang.reflect.Method.invokeNative (Method.java)
java.lang.reflect.Method.invoke (Method.java:515)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run     (ZygoteInit.java:732)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:566)
dalvik.system.NativeStart.main (NativeStart.java)

在我将recyclelView添加到我的布局和更多代码后,它开始发生但我怀疑它:

It started happening after I added recyclelView to my layout and more code but I suspect it:

com.testapp.MyRecyclerView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/recycleViewImages"

这是我的自定义recyclerview但是这个错误发生了,即使是定期的recyclerview(不是我的自定义)

this is my custom recyclerview but this bug happened even with the regular recyclerview (not my custom)

这里是我的自定义视图的代码:

and here is the code of my customview:

public class MyRecyclerView extends RecyclerView {
private FirebaseAnalytics mFirebaseAnalytics = null;

public MyRecyclerView(Context context) {
    super(context);
    if (mFirebaseAnalytics == null && context != null) {
        mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
    }
}

public MyRecyclerView(Context context, @Nullable AttributeSet attrs) {
    super(context, attrs);
    if (mFirebaseAnalytics == null && context != null) {
        mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
    }
}

public MyRecyclerView(Context context, @Nullable AttributeSet attrs, int defStyle) {
    super(context, attrs, defStyle);
    if (mFirebaseAnalytics == null && context != null) {
        mFirebaseAnalytics = FirebaseAnalytics.getInstance(context);
    }
}


@Override
protected void onAnimationEnd() {
    try {
        super.onAnimationEnd();
    }
    catch (Exception e) {
        Log.d("erez", "animation onAnimationEnd");
        if (mFirebaseAnalytics != null && e != null && e.getMessage() != null) {
            Bundle bundleCatch = new Bundle();
            bundleCatch.putString(FirebaseAnalytics.Param.ITEM_ID, "myrecycleview e: " + e.getMessage());
            bundleCatch.putString(FirebaseAnalytics.Param.ITEM_NAME, "myrecycleview e: " + e.getMessage());
            bundleCatch.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "onAnimationEnd catched");

        mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundleCatch);
        }
    }
    catch (NoClassDefFoundError ncdfe) {
        if (mFirebaseAnalytics != null && ncdfe != null && ncdfe.getMessage() != null) {
            Bundle bundleCatch = new Bundle();
            bundleCatch.putString(FirebaseAnalytics.Param.ITEM_ID, "myrecycleview ncdfe: " + ncdfe.getMessage());
            bundleCatch.putString(FirebaseAnalytics.Param.ITEM_NAME, "myrecycleview ncdfe: " + ncdfe.getMessage());
            bundleCatch.putString(FirebaseAnalytics.Param.CONTENT_TYPE, "onAnimationEnd catched");
          mFirebaseAnalytics.logEvent(FirebaseAnalytics.Event.SELECT_CONTENT, bundleCatch);
        }
    }
}

}

如你所见,我正在尝试覆盖 onAnimationEnd ,以便将捕获日志写入firebase,但它没有被捕获并且仍然为用户崩溃。

As you see, I'm trying to override onAnimationEnd in order to write the catch log to firebase but it isn't caught there and still crashing for the users.

无论如何,这个MyRecyclerView作为我的Activity中的成员保存:

Anyway, this MyRecyclerView is held as a member in my Activity:

我通过findViewById设置它然后:

I set it by findViewById and then:

LinearLayoutManager layoutManager = new LinearLayoutManager(Player.this);
    if (mScreenOrientation == Configuration.ORIENTATION_PORTRAIT) {
        layoutManager.setOrientation(LinearLayoutManager.HORIZONTAL);
    } else if (mScreenOrientation == Configuration.ORIENTATION_LANDSCAPE) {
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
    }
    mRecycleViewPreviewedVideos.setLayoutManager(layoutManager);

然后我在这里设置了适配器。没什么特别的。
我知道View有一个名为onAnimationEnd的方法,但它从未在我的智能手机中达到它。它主要是在Api 19上达成的。 (还有17和18)。

and then I set its adapter as seen by users here. nothing special. I know that View has a method named onAnimationEnd but it never reaches it in my smartphone. it's only reached on Api 19 mostly. (and also 17 and 18).

任何人都曾经遇到这种情况?如何解决?

我在这里报告了错误: https://issuetracker.google.com/issues/73048586

I reported the bug here: https://issuetracker.google.com/issues/73048586

推荐答案

所以我向谷歌报告了这个问题,现在他们回答说这个错误是修复的! :-)我想不需要更新库,因为没有可用的更新。此外,我还尝试使用YouTube API的库,但同样崩溃,因此与库有关系。 Google给我写道:开发团队已经修复了您报告的问题,并且将在未来版本中提供。

So I reported the issue to Google and now they responded that the bug is fixed! :-) I guess that no library update is needed as no update is available. Moreover, I also tried to use an old library of YouTube API but got the same crash so מם relation to the library. Google wrote me: "The development team has fixed the issue that you have reported and it will be available in a future build."

这篇关于异常java.lang.NoClassDefFoundError:pim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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