Import Slidingmenu Error solution in Androidstudio

Source: Internet
Author: User

----------------------------------------------------------------------------------------------
[Copyright: The author of this article is original, reproduced please indicate the source]
Article Source: http://blog.csdn.net/sdksdk0/article/details/51940832
Juppé id:sdksdk0 Email: [Email protected]

--------------------------------------------------------------------------------------------


In the use of third-party open-source slide-in framework, the original eclipse in the import problem is not very basic, is to refer to the library can be, but in the Androidstudio in the import will encounter some weird problems. Let's share how to import the Slidingmenu library correctly in Androidstudio.

It is recommended that you do not copy the library directly to the app sibling directory when importing. We can use the File->new->import Module and then select the File->project structure->dependencies->3model Select the path of the Slidingmenu in the dependency. You can choose the Libary library here. Then choose the dependency on the File->project Structure->dependencies->3model dependency.


After completing this step, we will find that, well, there will be problems, that is, the error. In the console to find the error file, that is Slidingmenu's build.gradle, we can find the report of voluntary errors.




At this time, you need to modify some parameters in the Slidingmenu build.gradle, such as dependencies \compilesdkversion, Buildtoolsversion, and so on with their own as match.





Finally, if you find an error: Errors: (303, 27) Wrong: symbol symbol: Method sin (float) Location: Class Floatmath,



The workaround is to:




Then find this line below this class and modify it to return (float) Math.sin (f);


So we can all solve the problem, then we will be happy to use the sliding frame.






Import Slidingmenu Error solution in Androidstudio

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.