Android 错误记录

系统错误 : java.lang.NoSuchMethodError: No static method getScreenWidthDp(Landroid/content/res/Resources;)I in class Landroid/support/v4/content/res/ConfigurationHelper; or its super classes (declaration of 'android.support.v4.content.res.ConfigurationHelper' appears in /data/app/com.xianglin.app-1/base.apk:classes8.dex)
11-27 09:23:38.754 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.view.ActionBarPolicy.getMaxActionButtons(ActionBarPolicy.java:55)
11-27 09:23:38.754 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.widget.ActionMenuPresenter.initForMenu(ActionMenuPresenter.java:108)
11-27 09:23:38.754 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.view.menu.MenuBuilder.addMenuPresenter(MenuBuilder.java:255)
11-27 09:23:38.754 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.widget.ActionMenuView.getMenu(ActionMenuView.java:646)
11-27 09:23:38.754 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.widget.Toolbar.ensureMenu(Toolbar.java:1030)
11-27 09:23:38.754 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.widget.Toolbar.getMenu(Toolbar.java:1001)
11-27 09:23:38.755 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.widget.ToolbarWidgetWrapper.getMenu(ToolbarWidgetWrapper.java:673)
11-27 09:23:38.755 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.app.ToolbarActionBar.getMenu(ToolbarActionBar.java:595)
11-27 09:23:38.755 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:447)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at android.support.v7.app.ToolbarActionBar$1.run(ToolbarActionBar.java:61)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at android.os.Handler.handleCallback(Handler.java:815)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at android.os.Handler.dispatchMessage(Handler.java:104)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at android.os.Looper.loop(Looper.java:194)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at android.app.ActivityThread.main(ActivityThread.java:5824)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at java.lang.reflect.Method.invoke(Native Method)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at java.lang.reflect.Method.invoke(Method.java:372)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1010)
11-27 09:23:38.756 22254-22254/com.xianglin.app E/XlLogger: ║     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)

编译版本和build下的版本号一定要一致,我用的sdk27 
compileSdkVersion 27 
buildToolsVersion ‘27.0.3’ 
minSdkVersion 16 
targetSdkVersion 27

implementation ‘com.android.support:design:27.1.1’ 
implementation ‘com.android.support:support-v4:27.1.1’ 
implementation ‘com.android.support:cardview-v7:27.1.1’ 
implementation ‘com.android.support:gridlayout-v7:27.1.1’ 
implementation ‘com.android.support:recyclerview-v7:27.1.1’
 

同样的问题:

java.lang.NoSuchFieldError: No static field abc_action_bar_view_list_nav_layout of type I in class Lcom/aliyun/snap/snap_core/R$layout; or its superclasses (declaration of 'com.aliyun.snap.snap_core.R$layout' appears in /data/app/com.xianglin.app-1/base.apk:classes5.dex)

 在导入阿里视频的时候版本不兼容问题。

 

你可能感兴趣的:(Android开发)