What is the warning output “Ignoring InnerClasses” at compile time?

I am new to Android and use the Ical4j library to parse ICS files (Outlook Calendar).

However, when I create my application in Eclipse, a warning appears many times in the console:

[2010-07-22 15:58:31 - Google Calendar Upload] warning: Ignoring the InnerClasses attribute for an anonymous inner class that is not associated with the associated EnclosingMethod attribute. (This class was probably created by a broken compiler.)

What are the consequences of this? How can i solve this?

+39
android compiler-warnings
Jul 22 '10 at 10:50
source share
4 answers

This is quite common when jar files are included. Although the warning has nothing to worry about, if you just use the API in normal mode, you should be able to get rid of them by compiling ical4j yourself from a source in Eclipse (either create a new jar or just put the source in your own source folder). Although I must emphasize that if you have no problems, there is nothing to worry about.

+29
Jul 22 2018-10-22 at
source share

If your application and your libraries were all created using the new JDK (7+), and you still get it, you can fix this problem by telling Proguard to keep the attribute of the nested method. Just add the following Proguard rules:

-keepattributes EnclosingMethod

+31
01 Feb '16 at 6:21
source share

I had the same error when using the ksoap2 library.

To get rid of it, I downloaded the DJ Java Decompiler to decompile the .jar file into .java files. After that, I compiled the .java files into a .jar file using eclipse.

+4
Jun 13 '11 at 10:14
source share

Update build tools and keep libraries in the same version

+1
Oct 13 '16 at 23:09
source share



All Articles