Android Studio SlidingMenu cannot find the symbol solution for importing/configuring FloatMath. studioslidingmenu

Source: Internet
Author: User

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.

 

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.