我的应用程序在Android 7.0版崩溃,但为什么?

时间:2017-05-21 16:50:37

标签: android view crash crash-reports

在开发者控制台中,我收到了以下崩溃报告(仅限安装了Android 7.0的设备):

java.lang.RuntimeException: 
  at android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:260)
  at android.graphics.Canvas.drawBitmap(Canvas.java:1420)
  at android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)
  at android.widget.ImageView.onDraw(ImageView.java:1286)
  at android.view.View.draw(View.java:18318)
  at android.view.View.updateDisplayListIfDirty(View.java:17296)
  at android.view.View.draw(View.java:18080)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
  at android.view.View.updateDisplayListIfDirty(View.java:17291)
  at android.view.View.draw(View.java:18080)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
  at android.view.View.updateDisplayListIfDirty(View.java:17291)
  at android.view.View.draw(View.java:18080)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
  at android.view.View.updateDisplayListIfDirty(View.java:17291)
  at android.view.View.draw(View.java:18080)
  at android.view.ViewGroup.drawChild(ViewGroup.java:3966)
  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)
  at android.view.View.draw(View.java:18321)
  at com.android.internal.policy.DecorView.draw(DecorView.java:919)
  at android.view.View.updateDisplayListIfDirty(View.java:17296)
  at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:692)
  at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:698)
  at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:806)
  at android.view.ViewRootImpl.draw(ViewRootImpl.java:3128)
  at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2924)
  at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2516)
  at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)
  at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7091)
  at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
  at android.view.Choreographer.doCallbacks(Choreographer.java:702)
  at android.view.Choreographer.doFrame(Choreographer.java:638)
  at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
  at android.os.Handler.handleCallback(Handler.java:751)
  at android.os.Handler.dispatchMessage(Handler.java:95)
  at android.os.Looper.loop(Looper.java:154)
  at android.app.ActivityThread.main(ActivityThread.java:6682)
  at java.lang.reflect.Method.invoke(Native Method:0)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)

我的应用正在处理每个小于7的其他Android版本。 这个错误信息意味着什么,我该如何解决?

这是我的build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.penta.games.mrpolitik"
        minSdkVersion 18
        targetSdkVersion 25
        versionCode 2
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support:design:25.2.0'
    compile 'com.aurelhubert:ahbottomnavigation:1.1.8'
    compile 'com.android.support:support-vector-drawable:25.2.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.1'
    compile 'com.github.paolorotolo:expandableheightlistview:1.0.0'
    testCompile 'junit:junit:4.12'
}

也许这一行会导致崩溃?

compile 'com.android.support:support-vector-drawable:25.2.0'

0 个答案:

没有答案