Phonegap(build)大型闪屏让Android应用程序崩溃

时间:2017-09-14 13:03:25

标签: crash phonegap-build splash-screen phonegap

我使用带有“Phonegap Build”构建的闪屏Cordova插件为我的Phonegap应用设置了启动画面。

在splashscreen插件文档中,他们只提到高达xhdpi的像素密度,但最近的设备上升到xxxhdpi。

所以我添加了一个xxxhdpi splashscreen图像。

现在应用程序似乎在启动时在这些设备上崩溃,我认为这是由于大型闪屏。

  

了java.lang.RuntimeException:       在android.view.DisplayListCanvas.throwIfCannotDraw(DisplayListCanvas.java:260)       在android.graphics.Canvas.drawBitmap(Canvas.java:1420)       在android.graphics.drawable.BitmapDrawable.draw(BitmapDrawable.java:545)       在android.widget.ImageView.onDraw(ImageView.java:1286)       在android.view.View.draw(View.java:18319)       在android.view.View.updateDisplayListIfDirty(View.java:17297)       在android.view.View.draw(View.java:18081)       在android.view.ViewGroup.drawChild(ViewGroup.java:3966)       在android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)       在android.view.View.updateDisplayListIfDirty(View.java:17292)       在android.view.View.draw(View.java:18081)       在android.view.ViewGroup.drawChild(ViewGroup.java:3966)       在android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)       在android.view.View.updateDisplayListIfDirty(View.java:17292)       在android.view.View.draw(View.java:18081)       在android.view.ViewGroup.drawChild(ViewGroup.java:3966)       在android.view.ViewGroup.dispatchDraw(ViewGroup.java:3752)       在android.view.View.draw(View.java:18322)       在com.android.internal.policy.DecorView.draw(DecorView.java:854)       在android.view.View.updateDisplayListIfDirty(View.java:17297)       在android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:666)       在android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:672)       在android.view.ThreadedRenderer.draw(ThreadedRenderer.java:780)       在android.view.ViewRootImpl.draw(ViewRootImpl.java:3112)       在android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2908)       在android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2502)       在android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1509)       在android.view.ViewRootImpl $ TraversalRunnable.run(ViewRootImpl.java:7051)       在android.view.Choreographer $ CallbackRecord.run(Choreographer.java:927)       在android.view.Choreographer.doCallbacks(Choreographer.java:702)       在android.view.Choreographer.doFrame(Choreographer.java:638)       在android.view.Choreographer $ FrameDisplayEventReceiver.run(Choreographer.java:913)       在android.os.Handler.handleCallback(Handler.java:751)       在android.os.Handler.dispatchMessage(Handler.java:95)       在android.os.Looper.loop(Looper.java:154)       在android.app.ActivityThread.main(ActivityThread.java:6692)       at java.lang.reflect.Method.invoke(Native Method)       在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:1468)       在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

在其他问题中,我发现了以下建议:

Move your image in the (hi-res) drawable to drawable-xxhdpi

但是使用Phonegap Build,我看不出我能做到这一点。是不是有可能有这么大的文件?我应该删除最高像素密度吗?还有其他选择吗?

0 个答案:

没有答案