应用程序在 Nougat+ 版本上运行,但在 Marshmallow 和 Lollipop 上崩溃

每当我启动应用程序时,它就会崩溃并说这是错误报告


不幸的是,{app-name} 已停止


java.lang.RuntimeException:


  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2339)

  at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2413)

  at android.app.ActivityThread.access$800 (ActivityThread.java:155)

  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1317)

  at android.os.Handler.dispatchMessage (Handler.java:102)

  at android.os.Looper.loop (Looper.java:135)

  at android.app.ActivityThread.main (ActivityThread.java:5343)

  at java.lang.reflect.Method.invoke (Native Method)

  at java.lang.reflect.Method.invoke (Method.java:372)

  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:905)

  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:700)

引起:android.view.InflateException:


  at android.view.LayoutInflater.createViewFromTag (LayoutInflater.java:763)

  at android.view.LayoutInflater.rInflate (LayoutInflater.java:806)

  at android.view.LayoutInflater.inflate (LayoutInflater.java:504)

  at android.view.LayoutInflater.inflate (LayoutInflater.java:414)

  at android.view.LayoutInflater.inflate (LayoutInflater.java:365)

  at android.support.v7.app.AppCompatDelegateImplV9.setContentView (AppCompatDelegateImplV9.java:287)

  at android.support.v7.app.AppCompatActivity.setContentView (AppCompatActivity.java:139)

  at com.khokhar.yousaf.cipher.Splash.onCreate (Splash.java:15)

  at android.app.Activity.performCreate (Activity.java:6010)

  at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1129)

  at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2292)

引起:android.content.res.Resources$NotFoundException:


慕码人8056858
浏览 136回答 3
3回答

慕慕森

background从ImageView 中删除原因是低版本无法在drawable- v24中实际存在的drawable目录中找到ic_launcher_foreground 。
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java