我正在尝试使用Android Studio构建已签名的APK。
我收到以下错误:
java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.typehandling.ShortTypeHandling
我的研究让我明白这是由我的一个依赖项使用旧版本的Groovy编译引起的。我唯一的依赖是Google Maps API,所以必须是它。
(this is a thread that talks some on the issue)
但是,我无法找到解决此问题的方法。我已经尝试了几种方法来添加Groovy backports compat 2.3.5: - 将其添加到gradle依赖项并同步项目 - 手动将其添加到m2 - 下载jar并将其添加为库
这些都没有成功。但是,这些解决方案中的一个可能有效,但我遗漏了一些必要的关键信息。
如果您知道可能是什么,或者您有其他方法可以解决这个问题,我希望收到您的来信。
感谢。
[编辑]以下是一些其他信息
C:\Users\Donald\AndroidStudioProjects\ReuseAndRepairAndroid>gradle dependencies --info
Starting Build
Starting file lock listener thread.
Settings evaluated using settings file 'C:\Users\Donald\AndroidStudioProjects\ReuseAndRepairAndroid\settings.gradle'.
Projects loaded. Root project using build file 'C:\Users\Donald\AndroidStudioProjects\ReuseAndRepairAndroid\build.gradle'.
Included projects: [root project 'ReuseAndRepairAndroid', project ':app']
Evaluating root project 'ReuseAndRepairAndroid' using build file 'C:\Users\Donald\AndroidStudioProjects\ReuseAndRepairAndroid\build.gradle'.
Evaluating project ':app' using build file 'C:\Users\Donald\AndroidStudioProjects\ReuseAndRepairAndroid\app\build.gradle'.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\Donald\AndroidStudioProjects\ReuseAndRepairAndroid\app\build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not create plugin of type 'AppPlugin'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 2.982 secs
[/编辑]