Android Studio Null pointer exception when rendering xml layouts -
yesterday making changes app, specificly actionbar colors, worked perfectly, able preview on android studio without problems , run on device works perfectly, morning when opened android studio, wont preview , throwing exception:
java.lang.nullpointerexception @ android.graphics.bitmap_delegate.createbitmap(bitmap_delegate.java:599) @ android.graphics.bitmap_delegate.createbitmap(bitmap_delegate.java:120) @ android.graphics.bitmap_delegate.createbitmap(bitmap_delegate.java:102) @ com.android.layoutlib.bridge.impl.resourcehelper.getdrawable(resourcehelper.java:236) @ com.android.layoutlib.bridge.bars.actionbarlayout.getdrawable(actionbarlayout.java:222) @ com.android.layoutlib.bridge.bars.actionbarlayout.setupactionbar(actionbarlayout.java:160) @ com.android.layoutlib.bridge.bars.actionbarlayout.<init>(actionbarlayout.java:127) @ com.android.layoutlib.bridge.impl.rendersessionimpl.createactionbar(rendersessionimpl.java:1627) @ com.android.layoutlib.bridge.impl.rendersessionimpl.inflate(rendersessionimpl.java:355) @ com.android.layoutlib.bridge.bridge.createsession(bridge.java:329) @ com.android.ide.common.rendering.layoutlibrary.createsession(layoutlibrary.java:332) @ com.android.tools.idea.rendering.renderservice$3.compute(renderservice.java:575) @ com.android.tools.idea.rendering.renderservice$3.compute(renderservice.java:564) @ com.intellij.openapi.application.impl.applicationimpl.runreadaction(applicationimpl.java:932) @ com.android.tools.idea.rendering.renderservice.createrendersession(renderservice.java:564) @ com.android.tools.idea.rendering.renderservice.render(renderservice.java:691) @ org.jetbrains.android.uipreview.androidlayoutpreviewtoolwindowmanager.dorender(androidlayoutpreviewtoolwindowmanager.java:604) @ org.jetbrains.android.uipreview.androidlayoutpreviewtoolwindowmanager.access$1900(androidlayoutpreviewtoolwindowmanager.java:80) @ org.jetbrains.android.uipreview.androidlayoutpreviewtoolwindowmanager$7$1.run(androidlayoutpreviewtoolwindowmanager.java:546) @ com.intellij.openapi.progress.impl.progressmanagerimpl$2.run(progressmanagerimpl.java:178) @ com.intellij.openapi.progress.progressmanager.executeprocessunderprogress(progressmanager.java:209) @ com.intellij.openapi.progress.impl.progressmanagerimpl.executeprocessunderprogress(progressmanagerimpl.java:212) @ com.intellij.openapi.progress.impl.progressmanagerimpl.runprocess(progressmanagerimpl.java:171) @ org.jetbrains.android.uipreview.androidlayoutpreviewtoolwindowmanager$7.run(androidlayoutpreviewtoolwindowmanager.java:541) @ com.intellij.util.ui.update.mergingupdatequeue.execute(mergingupdatequeue.java:320) @ com.intellij.util.ui.update.mergingupdatequeue.execute(mergingupdatequeue.java:310) @ com.intellij.util.ui.update.mergingupdatequeue$2.run(mergingupdatequeue.java:254) @ com.intellij.util.ui.update.mergingupdatequeue.flush(mergingupdatequeue.java:269) @ com.intellij.util.ui.update.mergingupdatequeue.flush(mergingupdatequeue.java:227) @ com.intellij.util.ui.update.mergingupdatequeue.run(mergingupdatequeue.java:217) @ com.intellij.util.concurrency.queueprocessor.runsafely(queueprocessor.java:238) @ com.intellij.util.alarm$request$1.run(alarm.java:327) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:334) @ java.util.concurrent.futuretask.run(futuretask.java:166) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:722)
all activities empty causes problem
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingleft="@dimen/activity_horizontal_margin" android:paddingright="@dimen/activity_horizontal_margin" android:paddingtop="@dimen/activity_vertical_margin" android:paddingbottom="@dimen/activity_vertical_margin" tools:context="com.andujardev.money.accountcreator"> </relativelayout>
the exception thrown when rendering preview
any help?
ask if need more info
edit: reason, error has action bar, have layout doesnt show action bar , can render normally, cant find problem program can compile , run time want.
solved! seems app icon image used (which changed last night) not on correct format render library not render image properly, device able use correctly.
Comments
Post a Comment