0

I am trying to build a signed APK with Android Studio.

I am getting the following error:

java.lang.ClassNotFoundException: org.codehaus.groovy.runtime.typehandling.ShortTypeHandling

My research leads me to understand that this is caused by one of my dependencies being compiled with an old version of Groovy. My only dependency is the Google Maps API, so that must be it.

(this is a thread that talks some on the issue)

However, I am unable to find a solution to this problem. I have tried several ways of adding the Groovy backports compat 2.3.5: - adding it to gradle dependencies and syncing the project - manually adding it to m2 - downloading the jar and adding it as a library

None of these have been successful. It is possible however, that one of these solutions may work, but that I am missing some key piece of information necessary.

If you know what that might be, or if you have another way to solve this, I'd like to hear from you.

Thanks.

[Edit]Here is some additional information

    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

[/Edit]

Community
  • 1
  • 1
Don Subert
  • 2,636
  • 4
  • 27
  • 37
  • Is this built with gradle? Does the dependencies task shed any light on it? – tim_yates Jun 09 '15 at 06:52
  • It is a gradle project, but I am not sure where to find the information that you are asking for – Don Subert Jun 09 '15 at 07:10
  • From the command line, you can run `gradle dependencies`. From android studio, there should be a gradle tab on the right, which should contain a list of tasks you can run. See if you can find the dependencies one, then run that? – tim_yates Jun 09 '15 at 07:14
  • Ah, thanks. I added the output of `gradle dependencies --info` to the bottom of the question. It doesn't seem to tell me anything though. It's just a generic error – Don Subert Jun 09 '15 at 07:19
  • The problem is probably Gradle version. I didn't realize that was something I have to manage myself. I thought it was built into Android Studio. Before trying to this tonight, I haven't used gradle at the command line. I'll update and see what happens – Don Subert Jun 09 '15 at 07:40
  • Generating a signed APK still fails, but this wasn't the cause. If, after more research, I can't solve the bigger issue, I'll put it in a different thread. Put up an answer about how Gradle is a separate program that needs to be updated independently and I'll accept it. – Don Subert Jun 09 '15 at 08:01

0 Answers0