147: AAPT: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

Description
A clear and concise description of what the question is.
latest version 5.7.6.1918
when run my app it say
147: AAPT: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted=“false” attribute?.
and have 7 error in this file
mobilertc\build.transforms\7e6ddedded35f187c361e9b8b818af0f\jetified-mobilertc\res\values\values.xml:3726:5-147

To Reproduce(If applicable)
Steps to reproduce the behavior:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [Emelautor pixel 3]
  • OS: [e.g. Android 11]

Additional context
Add any other context about the problem here.

Hi @otextech, thanks for using our SDK.

Most commonly, this error is caused by a naming collision between the SDK and another source. If the other source happens to be your own project, it can be easily resolved by renaming the attribute in your project. Otherwise if it is caused by another dependency used within your project, it may not be so easy to resolve. You could try updating the other dependency to the latest version to see if they have renamed it by chance.

Thanks!

still have the same error
my gradle version 7.0.2
my kotlin version 1.5.31
the error because of
formate of this
excluir dígito %d, excluir %s
%d should be %$s
please resolve this

Hi @otextech,

The Kotlin and Gradle versions used in your project probably are not going to impact the behavior, since it is most likely caused by the Android Video SDK sharing an XML name attribute with something else in your project. As mentioned earlier, if this naming collision is being caused by your own value, resolving it will be as simple as renaming that value in your project. Otherwise, if it is being caused by a 3rd party dependency, it is possible that the name of an element has changed in a newer version, so you could try updating your dependencies to the latest version to see if that resolves it.

Thanks!

This issue is in Zoom SDK.
Zoom SDK specifies multiple substitutions in non-positional format of string resources.

Let’s take a look at several (not all) strings from res/values/values.xml in Zoom SDK:

<string name="zm_accessbility_mfa_delete_digit_186496">delete digit %d, delete %s</string>
<string name="zm_join_meeting_fail_dialog_msg_164409">%s (Error Code: %d)</string>
<string name="zm_text_mfa_sms_resend_176897">%s or %s</string>

To fix the issue, they should look like this:

<string name="zm_accessbility_mfa_delete_digit_186496">delete digit %1$d, delete %2$s</string>
<string name="zm_join_meeting_fail_dialog_msg_164409">%1$s (Error Code: %2$d)</string>
<string name="zm_text_mfa_sms_resend_176897">%1$s or %2$s</string>

Could you please pass it to the developers, so they can schedule the fix?

Hi @minyushov,

I don’t believe that this is isolated to the SDK, otherwise building the sample app would fail as well. If you have any additional evidence of this being an issue caused by the SDK alone, I will be happy to look further into this. :slightly_smiling_face:

Thanks!

Of course, sample app is building, since we’re talking about warnings, not errors.

I’ve tried to build sample app (version 5.7.6.1922) and I’m seeing the same warnings:

> Task :example2:clean
> Task :sample:clean
> Task :example2:preBuild UP-TO-DATE
> Task :example2:preDebugBuild UP-TO-DATE
> Task :example2:generateDebugBuildConfig
> Task :example2:compileDebugAidl NO-SOURCE
> Task :example2:compileDebugRenderscript NO-SOURCE
> Task :example2:javaPreCompileDebug
> Task :example2:mainApkListPersistenceDebug
> Task :example2:generateDebugResValues
> Task :example2:generateDebugResources
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:269: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:271: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:1444: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:3291: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:3309: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:3310: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:4539: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.

/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:269: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:271: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:1444: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:3289: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:3307: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:3308: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:4537: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.

/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:269: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:271: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:1444: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:3289: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:3307: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:3308: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/Users/semikmsv/Downloads/zoom-sdk-android-5.7.6.1922/mobilertc-android-studio/example2/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:4537: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.

etc

Hi @minyushov,

Based on the warnings you are seeing (and the version you mentioned), this is coming up when building the Meeting SDK sample rather than the Video SDK. I am able to reproduce this with the Meeting SDK sample app. We can look into fixing these warnings in a future release. I’ll keep you updated as soon as we have any new information.

Please note that this thread has been moved over to the #mobile-meeting-sdk:android category.

Thanks!

1 Like