简体   繁体   English

Android Studio 2.2.3-导入DecimalFormat类Java代码

[英]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. 当我在Android Studio内部的MainActivity.java代码中收到此错误时,我很困惑。 I need to import the DecimalFormat class so I can establish a currency format. 我需要导入DecimalFormat类,以便可以建立货币格式。 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. 通过转到Gradle脚本,然后到build.gradle(Module:app),然后将我的minSdkVersion从15更改为24,就可以了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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