Android Studio 2.3 Null Pointer Exception -
this question has answer here:
- what nullpointerexception, , how fix it? 12 answers
whenever try add new activity or fragment error. (sdk-25.2.5)
null java.lang.nullpointerexception @ com.android.tools.idea.actions.newandroidcomponentaction.actionperformed(newandroidcomponentaction.java:121) @ com.intellij.openapi.actionsystem.ex.actionutil$1.run(actionutil.java:197) @ com.intellij.openapi.application.transactionguardimpl.runsynctransaction(transactionguardimpl.java:88) @ com.intellij.openapi.application.transactionguardimpl.submittransactionandwait(transactionguardimpl.java:156) @ com.intellij.openapi.actionsystem.ex.actionutil.performactiondumbaware(actionutil.java:211) @ com.intellij.openapi.actionsystem.impl.actionmenuitem$actiontransmitter.lambda$actionperformed$2(actionmenuitem.java:304) @ com.intellij.openapi.wm.impl.focusmanagerimpl.runonowncontext(focusmanagerimpl.java:905) @ com.intellij.openapi.wm.impl.idefocusmanagerimpl.runonowncontext(idefocusmanagerimpl.java:124) @ com.intellij.openapi.actionsystem.impl.actionmenuitem$actiontransmitter.actionperformed(actionmenuitem.java:284) @ javax.swing.abstractbutton.fireactionperformed(abstractbutton.java:2022) @ com.intellij.openapi.actionsystem.impl.actionmenuitem.lambda$fireactionperformed$0(actionmenuitem.java:112) @ com.intellij.openapi.application.transactionguardimpl.runsynctransaction(transactionguardimpl.java:88) @ com.intellij.openapi.application.transactionguardimpl.access$300(transactionguardimpl.java:40) @ com.intellij.openapi.application.transactionguardimpl$2.run(transactionguardimpl.java:113) @ com.intellij.openapi.application.transactionguardimpl.submittransaction(transactionguardimpl.java:123) @ com.intellij.openapi.application.transactionguard.submittransaction(transactionguard.java:109) @ com.intellij.openapi.actionsystem.impl.actionmenuitem.fireactionperformed(actionmenuitem.java:112) @ javax.swing.abstractbutton$handler.actionperformed(abstractbutton.java:2348) @ javax.swing.defaultbuttonmodel.fireactionperformed(defaultbuttonmodel.java:402) @ javax.swing.jtogglebutton$togglebuttonmodel.setpressed(jtogglebutton.java:308) @ javax.swing.abstractbutton.doclick(abstractbutton.java:376) @ javax.swing.plaf.basic.basicmenuitemui.doclick(basicmenuitemui.java:833) @ javax.swing.plaf.basic.basicmenuitemui$handler.mousereleased(basicmenuitemui.java:877) @ java.awt.component.processmouseevent(component.java:6533) @ javax.swing.jcomponent.processmouseevent(jcomponent.java:3324) @ java.awt.component.processevent(component.java:6298) @ java.awt.container.processevent(container.java:2236) @ java.awt.component.dispatcheventimpl(component.java:4889) @ java.awt.container.dispatcheventimpl(container.java:2294) @ java.awt.component.dispatchevent(component.java:4711) @ java.awt.lightweightdispatcher.retargetmouseevent(container.java:4888) @ java.awt.lightweightdispatcher.processmouseevent(container.java:4525) @ java.awt.lightweightdispatcher.dispatchevent(container.java:4466) @ java.awt.container.dispatcheventimpl(container.java:2280) @ java.awt.window.dispatcheventimpl(window.java:2746) @ java.awt.component.dispatchevent(component.java:4711) @ java.awt.eventqueue.dispatcheventimpl(eventqueue.java:758) @ java.awt.eventqueue.access$500(eventqueue.java:97) @ java.awt.eventqueue$3.run(eventqueue.java:709) @ java.awt.eventqueue$3.run(eventqueue.java:703) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$javasecurityaccessimpl.dointersectionprivilege(protectiondomain.java:80) @ java.security.protectiondomain$javasecurityaccessimpl.dointersectionprivilege(protectiondomain.java:90) @ java.awt.eventqueue$4.run(eventqueue.java:731) @ java.awt.eventqueue$4.run(eventqueue.java:729) @ java.security.accesscontroller.doprivileged(native method) @ java.security.protectiondomain$javasecurityaccessimpl.dointersectionprivilege(protectiondomain.java:80) @ java.awt.eventqueue.dispatchevent(eventqueue.java:728) @ com.intellij.ide.ideeventqueue.defaultdispatchevent(ideeventqueue.java:795) @ com.intellij.ide.ideeventqueue._dispatchevent(ideeventqueue.java:627) @ com.intellij.ide.ideeventqueue.dispatchevent(ideeventqueue.java:387) @ java.awt.eventdispatchthread.pumponeeventforfilters(eventdispatchthread.java:201) @ java.awt.eventdispatchthread.pumpeventsforfilter(eventdispatchthread.java:116) @ java.awt.eventdispatchthread.pumpeventsforhierarchy(eventdispatchthread.java:105) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:101) @ java.awt.eventdispatchthread.pumpevents(eventdispatchthread.java:93) @ java.awt.eventdispatchthread.run(eventdispatchthread.java:82)
since not working,right i'm adding java class,xml file linking them together.is there solution this???
edit-- project doesn't have code(apart default generated activity_main.xml , mainactivity.java) there has ide error. caused when tried add new activity project(by right click on project>new>activity>emptyactivity) , error being shown in every project opened(in ide error logs @ bottom right corner). tried invalidate , restart didnt work solutions??
try - go "file" on navigation of android studio. - select option "invalidate caches/restart.."
Comments
Post a Comment