Android Studio SlidingMenu cannot find the symbol solution for importing/configuring FloatMath. studioslidingmenu
SlidingMenu is a third-party open-source slide control. Is a good interaction logic.
Many excellent applications use SlidingMenu, such as QQ and CSDN Android clients.
Its github home: https://github.com/jfeinstein10/SlidingMenu
Before configuration, We need to download the ZIP code from its home page and decompress it.
The configuration process of SlidingMenu is as follows:
Unlike open-source frameworks such as EventBus, SlidingMenu requires manual configuration. Relatively troublesome.
First, decompress the downloaded Zip file to obtain
Then modify build. gradle in the "SlidingMenu \ library" directory:
Android {
CompileSdkVersion XX
BuildToolsVersion "XX"
DefaultConfig {
MinSdkVersion XX
TargetSdkVersion XX
}
Change to the version of the current project, as shown in figure
Before modification:
1 android {2 compileSdkVersion 173 buildToolsVersion "17.0.0"4 5 defaultConfig {6 minSdkVersion 77 targetSdkVersion 168 }
After modification:
1 android {2 compileSdkVersion 233 buildToolsVersion "23.0.3"4 5 defaultConfig {6 minSdkVersion 147 targetSdkVersion 238 }
Then click File> New> Import module in Android Studio, select the SlidingMenu \ library folder, and click OK.
After the build is complete, the following will appear:
The symbol FloatMath is not found.
This is because FloatMath () is not supported after Android 6.0 (). We just need to change it to Math.
The file path is app \ libs \ SlidingMenu \ library \ src \ com \ jeremyfeinstein \ slidingmenu \ lib \ customviewabve. java.
Then Rebuild
Then add the File Dependencies dependency.
Then you can use SlidingMenu happily.
The following is the implementation result of a small Demo:
For more information about the code, see my next blog.