这很奇怪,因为它在实现中工作,但编辑器以红色突出显示导入的最后一个单词(参见附图)。并将该文件下划线标记为“有错误”。
在我的应用程序 gradle 上我有:
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.code.gson:gson:2.8.6'
Run Code Online (Sandbox Code Playgroud)
在另一个梯度上:
buildscript {
ext.kotlin_version = "1.5.10"
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}}
allprojects {
repositories {
google()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir}
Run Code Online (Sandbox Code Playgroud)
有人能指出我正确的方向吗?谢谢!
有没有简单的方法让系统返回本地货币符号?
\n我一直在搜索,但找不到任何东西,很快你就可以用两行来实现这一点:
\n让 locale = Locale.current
\n让currencySymbol = locale.currencySymbol!
\n\xc2\xbfKotlin中有类似的东西吗?
\n