AAPT: error: attribute android:foregroundServiceType not found

We are trying to use Zoom Android SDK in our project. When we add mobilertc to our dependency in app build.gradle and try to generate an apk using the command ./gradlew assembleDebug --stacktrace, it gives the error

Execution failed for task ‘:app:processDebugResources’.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
…/app/build/intermediates/packaged_manifests/debug/AndroidManifest.xml:404: AAPT: error: attribute android:foregroundServiceType not found.

On opening the AndroidManifest.xml file and on line 404, its

We have referred to the solution given on the forum link Unable to build project using Compile Version SDK of 28 (attribute foregroundServiceType not found) - #3 by baijnathpandey15 but it does not work.

Which Android Client SDK version?
Zoom SDK Version: v5.5.1.1317

To Reproduce(If applicable)

  1. Add mobilertc project dependency (implementation project(path: ‘:mobilertc’))
  2. Execute command in terminal ./gradlew assembleDebug --stacktrace



Additional context
Android compile SDK Version: 30
Android target SDK Version: 30
Android Build Tools Version: 30.0.2
Tried Invalidate cache and restart the Android Studio.
Note: We have tried to add tools:node=“replace” in the application tag of AndroidManifest.xml, then the above command creates the apk successfully but then the app crashes on the startup.

Hi @integration, thanks for the post.

Can you please confirm whether or not you have added the required dependencies after adding the SDK? They can be found in the build.gradle file of the mobilertc module in the sample app.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.