拒绝先前失败的类java

拒绝先前失败的类java

本文介绍了拒绝先前失败的类java.lang.Class上的重新初始化< nt&gt ;: java.lang.NoClassDefFoundError的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在控制台中看到一条信息日志,看起来像是一个错误。它是从艺术打印的,通常与记忆有关,但我需要帮助理解它的含义。有问题的类是我的MapFragment类。 MapFragment是我创建的自定义类,它扩展了SupportMapFragment,以便我可以重写触摸事件。

I see an information log in my console that looks like an error. It is printed from "art", which is generally associated to memory but I need help understanding what it means. The class in question is my MapFragment class. The MapFragment is a custom class I created that extends SupportMapFragment so that I can override touch events. Is this class causing this issue, and how can I resolve?

这是我的MapFragment类

Here is my MapFragment class

public class MapFragment extends SupportMapFragment {
    private TouchableWrapper mTouchView;

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        View originalContentView = super.onCreateView(inflater, container, savedInstanceState);
        mTouchView = new TouchableWrapper(getActivity());
        mTouchView.addView(originalContentView);
        return mTouchView;
    }

    @Override
    public View getView() {
        return mTouchView;
    }

    /**
     * MapOnTouchListener callback
     *
     * @param listener
     */
    public void setMapTouchListener(TouchableWrapper.MapOnTouchListener listener) {
        mTouchView.setMapOnTouchListener(listener);
    }

我收到的错误是,

The error I am receiving is,


推荐答案

java.lang.NoClassDefFoundError指示,那是在编译时发现的东西,但不是在运行时。也许你只需将它添加到Classpath中即可。

java.lang.NoClassDefFoundError indicates, that something was found at compiletime but not at runtime. Maybe you just have to add it to the Classpath.

右键单击您的项目并选择 - > Compile Module,然后重新启动该项目并重新启动。

Right click on your project and select -> Compile Module, and then re-start the project and it should work again.

这篇关于拒绝先前失败的类java.lang.Class上的重新初始化< nt&gt ;: java.lang.NoClassDefFoundError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 05:04