Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translation threw an uncaught PluginException. #13

Closed
Yves0 opened this issue Sep 10, 2016 · 7 comments
Closed

Translation threw an uncaught PluginException. #13

Yves0 opened this issue Sep 10, 2016 · 7 comments

Comments

@Yves0
Copy link

Yves0 commented Sep 10, 2016

Android Studio 2.1.3

PluginException: cannot create class "cn.yiiguxing.plugin.translate.action.TranslationAction" [Plugin: cn.yiiguxing.plugin.translate]

@YiiGuxing
Copy link
Owner

@Yves0 请问这是怎么出现的呢?我这里并不能重现该问题。

@Yves0
Copy link
Author

Yves0 commented Sep 10, 2016

@YiiGuxing 安装之后重启AS就报错了,event log如下
`20:08:52 Plugin Error: Translation threw an uncaught PluginException. Disable Plugin

20:08:52 PluginException: cannot create class "cn.yiiguxing.plugin.translate.action.TranslationAction" [Plugin: cn.yiiguxing.plugin.translate]

20:08:58 PluginException: cannot create class "cn.yiiguxing.plugin.translate.action.EditorPopupMenuAction" [Plugin: cn.yiiguxing.plugin.translate]

20:09:26 PluginException: cn/yiiguxing/plugin/translate/ui/Settings : Unsupported major.minor version 52.0 [Plugin: cn.yiiguxing.plugin.translate]`

两种安装方法都是这样

@YiiGuxing
Copy link
Owner

@Yves0 这个应该是java版本的问题,你的java版本是不是低于1.7的?这个插件需要java 1.7以上的版本才行呢。

@YiiGuxing
Copy link
Owner

@Yves0 这个问题将在下一个版本修复,请留意版本更新。详情请查看: commit 47fd2af.

@Yves0
Copy link
Author

Yves0 commented Sep 13, 2016

不好意思,忘记回复了。刚刚看到您的修改是降低了jdk版本,可是我的jdk是1.7啊。

@YiiGuxing
Copy link
Owner

YiiGuxing commented Sep 13, 2016

已经上传到插件中心上的包编译还是有问题的,需要重新编译。这要放到下一个版本一起发了,如果你想先用着的话,可以把源码下载下来自己编译一个先用着(可能会有一些小问题)。
需要注意的是:

  • 要用IDEA2016.2以上的版本编译,Android Studio是不能编译的。
  • Java Compiler-Project bytecode version要指定为1.6。位置:preferences > Build > Compiler > Java Compiler。
  • 不要修改插件的版本号,不然后续可能会收不到正式的更新通知。

还有一个办法是将Java升级到1.8版本。

@Yves0
Copy link
Author

Yves0 commented Sep 13, 2016

好的,thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants