Android Studio warning:ignoring innerclasses attribute for an anonymous inner class

Source: Internet
Author: User

After successfully importing an eclipse-made Android project into Android Studio, launch the build and report an error such as, but the project can start running normally:

  

most of the online Most of the solutions are:

Add the following code to the configuration file Proguard-rules.pro of the project project:
-keepattributes Enclosingmethod

But after the attempt is still not able to publish, the last use of this method to solve, after the addition can be published normally

First modify the Gradle configuration file, enable Multidex, and include Multidex support:

Defaultconfig {
multidexenabled true
}

dependencies {compile ' com. android.support:multidex:1.0.1 '}

Then let the app support multiple Dex files. Three optional methods are described in Multidexapplication Javadoc:

1, in the application of Androidmanifest.xml declaration android.support.multidex.MultiDexApplication;
2, if you already have your own application class, let it inherit multidexapplication;
3, if your application class has been inherited from other classes, you do not want/can modify it, then you can rewrite the Attachbasecontext () method:

@Override protected void Attachbasecontext (Context base) {  Super. Attachbasecontext (base);  Multidex.install (this); } 

Finally, it can be run, or packaged, and this problem is said to be in the engineering of the number of methods more than the number of Android 65,536 methods.

Android Studio warning:ignoring innerclasses attribute for an anonymous inner class

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.