Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple warnings "Ignoring InnerClasses attribute for an anonymous inner class" when building project #31

Closed
gdomingues opened this issue Jun 30, 2016 · 6 comments

Comments

@gdomingues
Copy link

After adding this lib to one of the projects I work with I'm facing more than 500 warnings when building the project. It seems it has to do with Log4J as you can see below.

Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$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:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$2) 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:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$3) 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:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(org.apache.log4j.chainsaw.ControlPanel$4) 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.

Uber Rides SDK is the only lib I have on my project which has Log4J as a dependency, according to what I see when I run ./gradlew app:dependencies.

I've tried to add these rules to the Proguard file, though it didn't work:

-keepattributes InnerClasses
-keepattributes EnclosingMethod
-dontoptimize

By now I'm removing the Rides SDK from my project, since apparently there's nothing I can do from my side to suppress all these warning messages.

If you need more info, just let me know.

@tyvsmith
Copy link
Member

tyvsmith commented Jul 7, 2016

Thanks for the report. We'll look into it!

@tyvsmith
Copy link
Member

tyvsmith commented Jul 7, 2016

Please update to the latest SDK "0.5.1" where log4j should not be included, however there is a separate proguard issue.

You should be able to add this to your proguard file to continue for now. We'll be updating the SDK with a fix soon.

-dontwarn com.google.api.**

@tyvsmith
Copy link
Member

This is now fixed in v0.5.2

@tonysms
Copy link

tonysms commented Sep 25, 2016

Any update on this issue?

@YasirAmeen
Copy link

Facing same issue while integrating pusher sdk

@kamage5
Copy link

kamage5 commented Oct 24, 2018

android{
lintOptions {
checkReleaseBuilds false
abortOnError false
}*

}

use that above in your gradle and things will go well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants