织梦CMS - 轻松建站从此开始!

沙龙国际-沙龙365国际_沙龙国际网上娱乐

当前位置: 主页 > 沙龙国际网上娱乐 >

java.lang.NoClassDefFoundError,安卓

时间:2017-07-17 19:53来源:未知 作者:admin 点击:
昨天好的,今天就不行了,下边的代码报错 WxShareMenu popup = new WxShareMenu(AboutActivity.this); popup.showPopupWindow(); java.lang.NoClassDefFoundError: org.pointstone.cugapp.view.WxShareMenu at org.pointstone.cugapp.acti

昨天好的,今天就不行了,下边的代码报错

WxShareMenu popup = new WxShareMenu(AboutActivity.this);
                popup.showPopupWindow();
java.lang.NoClassDefFoundError: org.pointstone.cugapp.view.WxShareMenu
                                                                           at org.pointstone.cugapp.activities.AboutActivity$5.onClick(AboutActivity.java:188)
                                                                           at android.view.View.performClick(View.java)
                                                                           at android.view.View$PerformClick.run(View.java)
                                                                           at android.os.Handler.handleCallback(Handler.java)
                                                                           at android.os.Handler.dispatchMessage(Handler.java)
                                                                           at android.os.Looper.loop(Looper.java)
                                                                           at android.app.ActivityThread.main(ActivityThread.java)
                                                                           at java.lang.reflect.Method.invokeNative(Native Method)
                                                                           at java.lang.reflect.Method.invoke(Method.java)
                                                                           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java)
                                                                           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java)
                                                                           at dalvik.system.NativeStart.main(Native Method)

下边是相关代码,我又新建了两个新的,把代码复制过去还是不行
WxShareMenu.java

package org.pointstone.cugapp.view;

import android.app.Activity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.animation.Animation;

import org.pointstone.cugapp.R;

import razerdp.basepopup.BasePopupWindow;

/**
 * Created by Administrator on 2017/3/2.
 */

public class WxShareMenu extends BasePopupWindow implements View.OnClickListener {
    private View popupView;

    public WxShareMenu(Activity context) {
        super(context);
        bindEvent();
    }

    @Override
    protected Animation initShowAnimation() {
        return getTranslateAnimation(250 * 2, 0, 300);
    }

    @Override
    public View getClickToDismissView() {
        return popupView.findViewById(R.id.click_to_dismiss);
    }

    @Override
    public View onCreatePopupView() {
        popupView = LayoutInflater.from(getContext()).inflate(R.layout.wx_share_menu, null);
        return popupView;
    }

    @Override
    public View initAnimaView() {
        return popupView.findViewById(R.id.popup_anima);
    }

    private void bindEvent() {
        if (popupView != null) {
            popupView.findViewById(R.id.tx_1).setOnClickListener(this);
            popupView.findViewById(R.id.tx_2).setOnClickListener(this);
            popupView.findViewById(R.id.tx_3).setOnClickListener(this);
        }

    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.tx_1:

                break;
            case R.id.tx_2:

                break;
            case R.id.tx_3:

                break;
            default:
                break;
        }

    }
}

wx_share_menu.xml


      
      (责任编辑:admin)
织梦二维码生成器
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
用户名: 验证码:点击我更换图片
栏目列表
推荐内容