Android-Package-Renamer icon indicating copy to clipboard operation
Android-Package-Renamer copied to clipboard

NullPointerException error

Open techyescountry opened this issue 2 years ago • 10 comments

hi bro, i got this bug. The plugin doesn't work. Pls help me troubleshoot. Thanks

java.lang.NullPointerException at com.github.nguyenphuc22.androidpackagerenamer.WorkingPackage.actionPerformed(WorkingPackage.kt:49) at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:315) at com.intellij.openapi.actionSystem.ex.ActionUtil.lambda$performActionDumbAwareWithCallbacks$4(ActionUtil.java:294) at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:337) at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAwareWithCallbacks(ActionUtil.java:294) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$performAction$4(ActionMenuItem.java:293) at com.intellij.openapi.wm.impl.FocusManagerImpl.runOnOwnContext(FocusManagerImpl.java:227) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.performAction(ActionMenuItem.java:286) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$new$0(ActionMenuItem.java:67) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.lambda$fireActionPerformed$3(ActionMenuItem.java:109) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105) at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94) at com.intellij.openapi.actionSystem.impl.ActionMenuItem.fireActionPerformed(ActionMenuItem.java:109) at com.intellij.ui.plaf.beg.BegMenuItemUI.doClick(BegMenuItemUI.java:546) at com.intellij.ui.plaf.beg.BegMenuItemUI$MyMouseInputHandler.mouseReleased(BegMenuItemUI.java:578) at java.desktop/java.awt.Component.processMouseEvent(Component.java:6656) at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3385) at java.desktop/java.awt.Component.processEvent(Component.java:6421) at java.desktop/java.awt.Container.processEvent(Container.java:2266) at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5026) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2324) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4948) at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4575) at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4516) at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2310) at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2804) at java.desktop/java.awt.Component.dispatchEvent(Component.java:4854) at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:788) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:737) at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:731) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:761) at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:759) at java.base/java.security.AccessController.doPrivileged(AccessController.java:399) at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:758) at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:918) at com.intellij.ide.IdeEventQueue.dispatchMouseEvent(IdeEventQueue.java:840) at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:763) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$6(IdeEventQueue.java:450) at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:791) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$7(IdeEventQueue.java:449) at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113) at com.intellij.ide.IdeEventQueue.performActivity(IdeEventQueue.java:624) at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:447) at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:881) at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:493) at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207) at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128) at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113) at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105) at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)

techyescountry avatar May 23 '23 13:05 techyescountry

Hi, I can see that my plugin can't find your Android TestFolder, are you sure your project is native android and have enough Android folder: Android TestFolder, TestFolder, build.gradle

nguyenphuc22 avatar May 23 '23 13:05 nguyenphuc22

yes thank you bro. I have build.gradle and app/src/test bit no TestFolder or Android Testfolder. I'm still a noob so not sure how to set up these folders. what shld I do to fix this?

techyescountry avatar May 24 '23 13:05 techyescountry

Oke, I somewhat understand your situation, I omitted folders not found in 0.1.1 version you can try it

nguyenphuc22 avatar May 24 '23 14:05 nguyenphuc22

Yep i saw the update and tried it but it seems like i have the same issue.

techyescountry avatar May 24 '23 14:05 techyescountry

It partially works i think but the compilation still failed.

techyescountry avatar May 24 '23 14:05 techyescountry

did you mean my plugin worked but when complile your have error

nguyenphuc22 avatar May 24 '23 14:05 nguyenphuc22

I thought it worked cuz when i check the folder and gradle.build it does changed the package name but it still give the same error. Previously it just gave the error and doesnt change anything.

After that i tried compiling and it failed.

techyescountry avatar May 24 '23 23:05 techyescountry

Can your project run before changing the package name?

Can you show me the error compile?

nguyenphuc22 avatar May 25 '23 00:05 nguyenphuc22

Yes my project worked just fine before changing the name. The project is here: https://github.com/techyescountry/quran_android_vi I dont have the pc with me now so i cant show you the error

techyescountry avatar May 25 '23 00:05 techyescountry

I gest rootcause this problem is my plugin not support project project have multi module. So, I will support it in next version

nguyenphuc22 avatar May 25 '23 03:05 nguyenphuc22