【发布时间】:2016-09-28 06:23:39
【问题描述】:
我正在使用带参数的字符串,如下所示:
<string name="share_1">My Android device has reached %1$s points in the app: https://play.google.com/store/apps/details?id=%2$s</string>
String s = getString(R.string.share_1, result.getText().toString(), activity.getApplicationContext().getPackageName());
Lint 给我这个错误:“格式字符串不是有效的格式字符串,因此不应将其传递给 string.format”
我正在使用最新版本的 Android Studio、最新版本的 gradle 和
compileSdkVersion 23
buildToolsVersion "23.0.3"
谢谢
【问题讨论】:
标签: android android-resources android-lint