permissions-dispatcher / permissions-dispatcher-plugin

IntelliJ plugin for supporting PermissionsDispatcher
https://plugins.jetbrains.com/plugin/8349
Apache License 2.0
706 stars 57 forks source link

"Generate Runtime Permissions" not work in Kotlin file #75

Closed sckm closed 7 years ago

sckm commented 7 years ago

When I trying to generate some methods with "Generate Runtime Permissions" in kotlin file, I'm getting the following error

[ 139300]  ERROR - llij.ide.plugins.PluginManager - org.jetbrains.kotlin.resolve.ImportPath.<init>(Ljava/lang/String;)V 
java.lang.NoSuchMethodError: org.jetbrains.kotlin.resolve.ImportPath.<init>(Ljava/lang/String;)V
    at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandlerKt.addImport(GeneratePMCodeHandlerKt.kt:115)
    at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandler.addRuntimePermissionAnnotation(GeneratePMCodeHandler.kt:33)
    at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandler.invoke(GeneratePMCodeHandler.kt:19)
    at com.github.shiraji.permissionsdispatcherplugin.handlers.GeneratePMCodeHandlerKt.invoke(GeneratePMCodeHandlerKt.kt:17)
    at com.intellij.codeInsight.actions.CodeInsightAction.lambda$null$0(CodeInsightAction.java:59)
    at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:898)
    at com.intellij.codeInsight.actions.CodeInsightAction.lambda$actionPerformedImpl$1(CodeInsightAction.java:62)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:129)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:100)
    at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:86)
    at com.intellij.codeInsight.actions.CodeInsightAction.actionPerformedImpl(CodeInsightAction.java:55)
    at com.intellij.codeInsight.actions.CodeInsightAction.actionPerformed(CodeInsightAction.java:41)
    at com.github.shiraji.permissionsdispatcherplugin.actions.GeneratePMCodeAction.access$actionPerformed$s-307674507(GeneratePMCodeAction.kt:30)
    at com.github.shiraji.permissionsdispatcherplugin.actions.GeneratePMCodeAction$actionPerformed$2.invoke(GeneratePMCodeAction.kt:102)
    at com.github.shiraji.permissionsdispatcherplugin.actions.GeneratePMCodeAction.actionPerformed(GeneratePMCodeAction.kt:124)
    at com.intellij.openapi.actionSystem.ex.ActionUtil$1.run(ActionUtil.java:197)
    at com.intellij.openapi.application.TransactionGuardImpl.runSyncTransaction(TransactionGuardImpl.java:88)
    at com.intellij.openapi.application.TransactionGuardImpl.submitTransactionAndWait(TransactionGuardImpl.java:156)
    at com.intellij.openapi.actionSystem.ex.ActionUtil.performActionDumbAware(ActionUtil.java:211)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.performAction(PopupFactoryImpl.java:875)
    at com.intellij.ui.popup.PopupFactoryImpl$ActionPopupStep.lambda$onChosen$0(PopupFactoryImpl.java:863)
    at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:199)
    at com.intellij.ui.popup.AbstractPopup.lambda$null$7(AbstractPopup.java:1390)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
    at java.awt.EventQueue.access$500(EventQueue.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:709)
    at java.awt.EventQueue$3.run(EventQueue.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:795)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:631)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[ 139306]  ERROR - llij.ide.plugins.PluginManager - Android Studio 2.3.3  Build #AI-162.4069837 
[ 139308]  ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_92 
[ 139308]  ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) 64-Bit Server VM 
[ 139308]  ERROR - llij.ide.plugins.PluginManager - Vendor: Oracle Corporation 
[ 139308]  ERROR - llij.ide.plugins.PluginManager - OS: Mac OS X 
[ 139308]  ERROR - llij.ide.plugins.PluginManager - Last Action: Generate 
shiraji commented 7 years ago

Thanks for reporting! I will take a look.