今天将之前的android studio 插件导入再次使用的时候,发现不能用了
错误1:Run configuration error: no plugin module specified for configuration
这个错误是因为idea默认生成了iml文件,将 PLUGIN_MODULE 改为了 JAVA_MODULE所以会有这个错误
但是改完之后,又发生了下面的错误
错误2:Wrong SDK type for plugin module 'xxx'
解决办法:
Please see https://www.jetbrains.com/help/idea/2016.1/configuring-intellij-platform-plugin-sdk.html.
Plugin modules need IntelliJ Platform Plugin SDK, not just Java SDK.
但是为什么会有这种问题呢?总不能每次从新导入工程都要改这些东西吧,
后来发现是因为我们导入的方式不对
问题发生的导入方法:
File -> Open 直接打开我们的项目,这种就会出问题,因为很多内容关联不上
正确的导入方式:
File -> New -> Project from existing Sources...
很多细节如果不注意,无意中就会浪费很多时间。