# AAPT: error: attribute android:foregroundServiceType not found

**URL:** <https://devforum.zoom.us/t/aapt-error-attribute-android-foregroundservicetype-not-found/49918>\
**Category:** Android\
**Created:** [May 10, 2021, 4:31am UTC](https://devforum.zoom.us/t/aapt-error-attribute-android-foregroundservicetype-not-found/49918 "2021-05-10T04:31:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![integration](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/integration/32/6590_2.png) [@integration](https://devforum.zoom.us/u/integration)\
**Post date:** [May 10, 2021, 4:31am UTC](https://devforum.zoom.us/t/aapt-error-attribute-android-foregroundservicetype-not-found/49918/1 "2021-05-10T04:31:26Z")

</div>

**Description**  
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](https://devforum.zoom.us/t/unable-to-build-project-using-compile-version-sdk-of-28-attribute-foregroundservicetype-not-found/8346/3) 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

**Screenshots**

 ![Zoom Error](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/0/3/03cd304efbb8da6e2d24c4bdc14d8471580c88e7.jpeg)

**Smartphone**  
Android

**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.

---

<div class="post-metadata">

**Author:** ![jon.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/jon.zoom/32/13495_2.png) [@jon.zoom](https://devforum.zoom.us/u/jon.zoom)\
**Post date:** [May 10, 2021, 4:36pm UTC](https://devforum.zoom.us/t/aapt-error-attribute-android-foregroundservicetype-not-found/49918/2 "2021-05-10T16:36:09Z")

</div>

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.

Thanks!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [June 10, 2021, 2:37am UTC](https://devforum.zoom.us/t/aapt-error-attribute-android-foregroundservicetype-not-found/49918/3 "2021-06-10T02:37:08Z")

</div>

Closed on June 10, 2021, 2:37am UTC

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