Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dx warning: Ignoring InnerClasses .. for org.apache.tools.ant

Tags:

android

ant

dx

I encountered this set of warnings which made memory overflow and eventually crashed Eclipse.

This is an Android application with twitter4J core jar included as a reference library. This is using Google APIs (com.google.android.) so I set the target to Google APIs not general ADK.

Here's the problem.

[2011-11-18 08:29:24 - Twitter] Dx warning: Ignoring InnerClasses attribute for an anonymous inner class (org.apache.tools.ant.taskdefs.Parallel$1) that doesn't come with an associated EnclosingMethod attribute. This class was probably produced by a compiler that did not target the modern .class file format. The recommended solution is to recompile the class from source, using an up-to-date compiler and without specifying any "-target" type options. The consequence of ignoring this warning is that reflective operations on this class will incorrectly indicate that it is not an inner class.

This kind of warning continues to an amount of approx 20 inner classes (about 6 in taskdefs), and all inner classes mentioned in the console are from org.apache.tools.ant.

I updated Java SE 6 to 1.6 for Mac OS X Lion with http://mac.softpedia.com/get/System-Utilities/Java.shtml,

but still the problem exists. Should I upgrade my ant? my ant version is 1.8.2.

like image 347
Macchiato13 Avatar asked Dec 21 '25 07:12

Macchiato13


1 Answers

This is a result of some of the used libraries having been compiled with JDK 1.4 or earlier. The solution is to recompile it all into new .jar files for Android Mock to use

like image 147
Kim Avatar answered Dec 22 '25 19:12

Kim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!