Reputation: 3976
When setting up my machine to work on Android I can't get the code to "compile" or maybe it is compiling and stops at some other process because it gives the error when it says "Generating classes.dex".
The error I get is the following:
Information: Note: Some input files use unchecked or unsafe operations.
Information: Note: Recompile with -Xlint:unchecked for details.
Information: Compilation completed with 12 errors and 2 warnings
Information: 12 errors
Information: 1 warning
Error: (org.joda.time.DateTimeZone$1) that doesn't come with an
Error: associated EnclosingMethod attribute. This class was probably produced by a
Error: compiler that did not target the modern .class file format. The recommended
Error: solution is to recompile the class from source, using an up-to-date compiler
Error: and without specifying any "-target" type options. The consequence of ignoring
Error: this warning is that reflective operations on this class will incorrectly
Error: indicate that it is *not* an inner class.
Error: (junitx.extensions.TestSetup$1) that doesn't come with an
Error: (junitx.ant.TestClassValidatorTask$1) that doesn't come with an
Error: (junitx.util.AbstractSuiteBuilder$1) that doesn't come with an
Error: (junitx.framework.TestSuite$1) that doesn't come with an
Error: (junitx.tool.TestClassValidator$1) that doesn't come with an
Warning: warning: Ignoring InnerClasses attribute for an anonymous inner class
The interesting thing is that this code compiles correctly in another computer we have that was setup looong time ago and nobody remembers what was done.
I've googled like crazy and everybody says you need to recompile from source JodaTime and whatever, but this can't possibly be the case because the same code (copied and pasted or downloaded from version control) works flawlessly on another machine, so there has to be something about my environment that is causing this, but I have no idea what to look for.
Any experts out there that recognize this type of error ?
Have you had this happen to you ? How did you fix it ??
Please help...
Notes:
- Using intellij
- Compiling for Android 1.6
Before somebody points it out I am aware a similar question has been asked before. Here for example: Recompile jodatime?. But in that case the proposed solution was to recompile the JodaTime sources. I believe this is not the case here since the code works in one computer and not the other.
Upvotes: 2
Views: 2166
Reputation: 1902
Have you tried updating IntelliJ?
I'm no expert at all but I ran into this same issue a few days ago, took quite a while to figure out what it was. Turned out to be the IntelliJ version.
Got it working just by updating to its latest version (nightly build).
Upvotes: 1
Reputation: 400
I was receiving the same error message and it turned out it was caused by having included two libraries that declared the same classes (e.g., an old and new version of a library). Don't know how the error message relates to that, but removing the old version solved my problem.
Upvotes: 0