----------------------------------------------------------------------------------------------
[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