简体   繁体   中英

Android Studio 2.2.3 - Import the DecimalFormat class Java Code

I am quite confused when I get this error within my MainActivity.java code inside Android Studio. I need to import the DecimalFormat class so I can establish a currency format. How do I resolve this?

Picture of error:

图片1

Picture of suggested fixes:

图片2

I finally figured out my own question. By going to Gradle Scripts and then to build.gradle(Module:app) and then changing my minSdkVersion from 15 to 24, it worked.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM