Multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?

Hi @shirgaonkarmihir14, thanks for using our SDK.

Have you tried the solutions mentioned previously in this thread? If so, what have you tried?

Thanks!

It is not possible to do formatted="false" as error is in zoom sdk mobilertc.aar file and there are lot of files that is not possible to change.error comes while adding zoom sdk dependency in gradle . i had also tried migrating my project into androidX but still error is same.

thank you

Hi @shirgaonkarmihir14,

Can you please take a look at the suggestions Carson made in this reply and let me know if you are still facing this issue?

Thanks!

yes the error i solved now
thank you so much

I am getting the same error. Error showing in values.xml file in mobilertc module. I tried by migrating into AndroidX and also by doing formatted = false and also changing %1$s. nothing working. How to solve this?

minSdkVersion 21
targetSdkVersion 29
Android Studio: 4.1.3
Gradle: 6.5

I am getting same error :
“Multiple substitutions specified in non-positional format; did you mean to add the formatted=“false” attribute?”
Error showing in values.xml file in mobilertc module. I tried by migrating into AndroidX and also by doing formatted = false and also changing %1$s. nothing working. How to solve this?

And also getting another error: "AAPT: error: duplicate value for resource ‘attr/progress’ with config ‘’. It is also in values.xml file of mobilertc module. How to solve this also?
I am unable to modify this value.xml file of mobilertc module.

Hi @aparajita, thanks for using the dev forum.

Can you please specify which version of the Android Gradle Plugin you are using? Also, do you have AndroidX enabled in your gradle.properties file?

Thanks!

Android Gradle Plugin version: 4.1.2

In my gradle.properties file has followings:

android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536m

Hi @aparajita,

Thanks for the additional information. Can you provide a demo app in which the error is reproducible? It can be sent over to developersupport@zoom.us.

Thanks!

I tried a demo app but it is giving different errors:

  1. “AAPT: error: attribute alignContent (aka com.example.demozoomapplication:alignContent) not found.” in mobilertc module.
  2. " AAPT: error: attribute flexWrap (aka com.example.demozoomapplication:flexWrap) not found." in mobilertc module.

Facing the issues in SDK’s AARs.
Also shared a link of Demo App in given mail id.
How to solve this demo as well as my app issues?

Hi @aparajita,

How are you adding the SDK to your project? Please be as detailed as possible.

Thanks!

Hi @jon.lieblich

Steps:
# Integrate with your app

1. Locate the libraries

The aar libraries are in the commonlib and mobilertc folders. Please ensure the following files are in these folders, if any of them is missing, please re-download them.

commonlib

commonlib/
├── build.gradle
├── commonlib.aar
└── commonlib.iml

mobilertc

mobilertc/
├── build.gradle
├── mobilertc.aar
└── mobilertc.iml

2. Add modules and configure dependencies

Open “Project Structure” and press “+ (Add Module)”.

Select “Import .JAR/.AAR Package” , locate the aar files and add them into your project. Last but not least, select your own module in the Project Structure, and add the libraries as dependencies.

Now you can import classes from the SDK in your own applications and enjoy the fantastic video conferencing experience in your apps.

# Build a Zoom meeting app

1. Create an Android project

Open Android Studio and click Start a new Android Studio Project . Next, on the Select a Project Template window, select Phone and Tablet > Empty Activity .

Click Next and enter your Application name , Company domain , select your Project location and Programming language in the next screen.

Select API 21: Android 5.0(Lollipop) or higher as the minimum SDK for the project and click Finish . A new project will be created for you by Android Studio.

Build and run this project on your emulator or on your device to ensure that there are no initial errors and your starter project is working.

2. Import the Zoom SDK libraries

If you have not already downloaded the Zoom Android SDK, please visit App Marketplace to download it. Refer to Download the Zoom SDK for instructions on how to download the SDK.

The downloaded folder includes SDK libraries and sample apps. The SDK libraries (aar libraries) are in the commonlib and mobilertc folders located inside the mobilertc-android studio folder. Ensure that the following files are included in these folders, if you find that any of them is missing or you delete one by mistake, re-download the SDK.

commonlib

commonlib/
├── build.gradle
├── commonlib.aar

mobilertc

mobilertc/
├── build.gradle
├── mobilertc.aar

Add modules and configure dependencies

In this step, you are going to import commonlib.aar and mobilertc.aar modules from the downloaded SDK package to your project as AAR files.In Android Studio, click File > Project Structure > Module > + > New module .

In the next screen, scroll down to select “ Import .JAR/.AAR Package ”, locate the aar files from the downloaded SDK package and add them into your project.

You will need to do it twice, once for commonlib.arr and once for mobilertc.arr .

Next, add these modules as dependencies of your app. Navigate to Project Structure, click Dependencies > App > + > “Module Dependency . In the next screen, select commonlib and mobilertc and click OK .

To confirm whether or not you have successfully configured the Zoom SDK dependencies, look for the build.gradle(Module:app) file inside the Gradle scripts folder and check if the following lines of code are present:

dependencies {
    implementation project(path: ':mobilertc')
    implementation project(path: ':commonlib')
}

If the above dependencies are present, your project is equipped with the Zoom Client SDK.

3. Initialize the SDK

In order to use the Zoom SDK, you need to initialize it. To do so, open your MainActivity.java file and within your onCreate method, call the initializeSDK method.
MainActivity.java

  @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        // Call this method to initialize the SDK
        initializeSdk(this);   
    }

You added the initializeSDK call inside the onCreate method but you haven’t yet implemented the intializeSDK method itself. You must provide your SDK Key and Secret for the initialization of the SDK.

To implement this method, add the following code below the onCreate method:
MainActivity.Java

public void initializeSdk(Context context) {
        ZoomSDK sdk = ZoomSDK.getInstance();
        // TODO: For the purpose of this demo app, we are storing the credentials in the client app itself. However, you should not use hard-coded values for your key/secret in your app in production.
       ZoomSDKInitParams params = new ZoomSDKInitParams();
        params.appKey = ""; // TODO: Retrieve your SDK key and enter it here
        params.appSecret = ""; // TODO: Retrieve your SDK secret and enter it here
        params.domain = "zoom.us";
        params.enableLog = true;
        // TODO: Add functionality to this listener (e.g. logs for debugging)
        ZoomSDKInitializeListener listener = new ZoomSDKInitializeListener() {
            /**
             * @param errorCode {@link us.zoom.sdk.ZoomError#ZOOM_ERROR_SUCCESS} if the SDK has been initialized successfully.
             */
            @Override
            public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) { }

            @Override
            public void onZoomAuthIdentityExpired() { }
        };
        sdk.initialize(context, listener, params);

    }

At this point, your MainActivity.java file should look similar to the following:

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        initializeSdk(this);

    }

public void initializeSdk(Context context) {
        ZoomSDK sdk = ZoomSDK.getInstance();
        // TODO: For the purpose of this demo app, we are storing the credentials in the client app itself. However, you should not use hard-coded values for your key/secret in your app in production.
       ZoomSDKInitParams params = new ZoomSDKInitParams();
        params.appKey = ""; // TODO: Retrieve your SDK key and enter it here
        params.appSecret = ""; // TODO: Retrieve your SDK secret and enter it here
        params.domain = "zoom.us";
        params.enableLog = true;
        // TODO: Add functionality to this listener (e.g. logs for debugging)
        ZoomSDKInitializeListener listener = new ZoomSDKInitializeListener() {
            /**
             * @param errorCode {@link us.zoom.sdk.ZoomError#ZOOM_ERROR_SUCCESS} if the SDK has been initialized successfully.
             */
            @Override
            public void onZoomSDKInitializeResult(int errorCode, int internalErrorCode) { }

            @Override
            public void onZoomAuthIdentityExpired() { }
        };
        sdk.initialize(context, listener, params);

    }

}

Hi @aparajita,

Can you please ensure that the build.gradle file in your project’s mobilertc module matches the same file in the sample app?

Thanks!

Hi @jon.lieblich,

I copied the content of build.gradle file from mobilertc module of sample app and pasted it to build.gradle file of mobilertc module of my project. But giving the same error.

  1. build.gradle file of mobilertc module from sample app:

  2. build.gradle file of mobilertc module from my app:

Hi @aparajita,

Can you please send your sample project to developersupport@zoom.us so that we can investigate further?

Thanks!

Hi,

I have already sent the sample project to the email address you provided. Can we please quickly resolve this issue?
Let me know if I need to refer to some other samples that you have.

Regards,
Aparajita

Hi @aparajita,

Apologies, but I am not seeing anything from the past few days with an Android project sent to that email. Can you please try sending it again?

Thanks!

Hi @jon.lieblich,

You will receive an email from tarumoy@ri**********.com with subject line “Android DemoApp with zoom integration.”

Hi @aparajita,

Thanks for sending that over again. Confirming that we have received your demo app. I will let you know as soon as we have any updates.

Thanks!

Hi @aparajita,

I was able to successfully build your demo app after modifying the mobilertc/build.gradle file as mentioned in my previous reply. Here is what the fully contents of that file should look like:

configurations.create("default")
artifacts.add("default", file('mobilertc.aar'))

dependencies.add("default","androidx.security:security-crypto:1.1.0-alpha02")
dependencies.add("default","com.google.crypto.tink:tink-android:1.5.0")
dependencies.add("default","androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")

dependencies.add("default","androidx.appcompat:appcompat:1.0.0")
dependencies.add("default","androidx.constraintlayout:constraintlayout:1.1.3")
dependencies.add("default","com.google.android.material:material:1.2.0-alpha03")
dependencies.add("default","com.google.android:flexbox:2.0.1")
dependencies.add("default","androidx.multidex:multidex:2.0.0")

Thanks!