亚洲免费在线视频-亚洲啊v-久久免费精品视频-国产精品va-看片地址-成人在线视频网

您的位置:首頁技術文章
文章詳情頁

android - java.lang.NoClassDefFoundError,安卓

瀏覽:147日期:2024-02-26 13:07:46

問題描述

昨天好的,今天就不行了,下邊的代碼報錯

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

<?xml version='1.0' encoding='utf-8'?><RelativeLayout xmlns:android='http://schemas.android.com/apk/res/android' android:layout_width='match_parent' android:layout_height='match_parent'> <RelativeLayoutandroid: android:layout_width='match_parent'android:layout_height='match_parent'android:background='@color/share_popup_bg'><LinearLayout android: android:layout_width='match_parent' android:layout_height='wrap_content' android:orientation='vertical' android:layout_alignParentBottom='true' android:background='@android:color/white' > <TextViewandroid: android:layout_width='match_parent'android:layout_height='60dp'android:gravity='center'android:text='分享到朋友圈'/> <View /> <TextViewandroid: android:layout_width='match_parent'android:layout_height='60dp'android:gravity='center'android:text='分享給微信好友'/> <View /> <TextViewandroid: android:layout_width='match_parent'android:layout_height='60dp'android:gravity='center'android:text='取消'/></LinearLayout> </RelativeLayout></RelativeLayout>

defaultConfig {applicationId 'org.pointstone.cugapp'minSdkVersion 16targetSdkVersion 24versionCode 10versionName '1.0.1'testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'multiDexEnabled true }

求解決,我要崩潰

問題解答

回答1:

函數超過 65536 個了,http://www.jianshu.com/p/2450...

回答2:

其實我覺得,你clear下項目一般都會好,你的Popupwindow又不是一般的寫在xml中需要完整包名,我沒發現你的寫法有問題,倒是Android Studio經常不把你寫的代碼打包到apk中,開發中經常遇到,一半Clear 或 Restart(Pc/Android Studio)可解決.android - java.lang.NoClassDefFoundError,安卓

回答3:

這個錯誤一般是由于運行環境找不到類或者定義的類創建失敗所造成,一般控件中出現這個錯誤可能是由于該控件中某些所需的資源無法找到的原因,如attrs.xml,drawables等等,所以你需要確認你導入的引用的library的完整性,是僅僅只是依賴了一個jar還是一個aar(一個完整的andorid工程庫),若只是依賴jar的話,可能需要重新修改下依賴.

標簽: java
相關文章:
主站蜘蛛池模板: 日韩一区二区三区在线免费观看 | 欧美色视频日本片高清在线观看 | 午夜在线观看视频免费 成人 | 国产成人一区在线播放 | 狠狠色丁香婷婷久久综合考虑 | a一区二区三区视频 | 在线a人片免费观看国产 | 女人让男人桶的小视频 | 久久国产影视 | 欧美极品在线播放 | 极品美女户外勾搭无套 | 欧洲亚洲综合一区二区三区 | 男女男精品视频免费观看 | 在线视频精品一区 | 日本免费在线观看视频 | 亚洲男同视频网站 | 免费视频18| 国产一区精品在线观看 | 91久久99久91天天拍拍 | 亚洲欧美另类自拍第一页 | 成人精品久久 | 91九色成人 | 一级色黄| 日韩欧美高清在线 | 欧美一级毛片aaaaa | 91在线精品亚洲一区二区 | 亚洲最大看欧美片网站 | 国产中文字幕免费观看 | 午夜国产精品久久久久 | 免费高清一级欧美片在线观看 | 国产精品1区2区 | 最新国产美女一区二区三区 | 欧美真人视频一级毛片 | 俺来也欧美亚洲a∨在线 | 黄www片| 亚洲天堂2015 | 国产精品成久久久久三级 | 精品成人在线 | 国产精品亚洲午夜不卡 | 日韩 亚洲 制服 欧美 综合 | 欧美性色生活免费观看 |