# Can't add builder for NotificationCompat

**URL:** https://discuss.kotlinlang.org/t/cant-add-builder-for-notificationcompat/24925
**Category:** Support
**Created:** [May 31, 2022, 5:13pm UTC](https://discuss.kotlinlang.org/t/cant-add-builder-for-notificationcompat/24925 "2022-05-31T17:13:38Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Zeppi](https://avatars.discourse-cdn.com/v4/letter/z/53a042/32.png) [@Zeppi](https://discuss.kotlinlang.org/u/Zeppi)
#### Post date: [May 31, 2022, 5:13pm UTC](https://discuss.kotlinlang.org/t/cant-add-builder-for-notificationcompat/24925/1 "2022-05-31T17:13:38Z")

</div>

Hello,  
I am trying to add a notification. I am following this: [https://developer.android.com/training/notify-user/build-notification](https://developer.android.com/training/notify-user/build-notification) .  
I have implemented this `implementation 'androidx.core:core-ktx:1.7.0'` in gradle and this in my fragment

```auto
var builder = NotificationCompat.Builder(this, CHANNEL_ID)
        .setSmallIcon(R.drawable.notification_icon)
        .setContentTitle("Test")
        .setContentText("TestContent")
        .setPriority(NotificationCompat.PRIORITY_DEFAULT)

```

But `Builder` is always red and it says “Unresolved reference: Builder”.

Maybe someone has an idea.  
Thank you

---

<div class="post-metadata">

### Author: ![theSaver](https://avatars.discourse-cdn.com/v4/letter/t/4491bb/32.png) [@theSaver](https://discuss.kotlinlang.org/u/theSaver)
#### Post date: [June 20, 2022, 1:43pm UTC](https://discuss.kotlinlang.org/t/cant-add-builder-for-notificationcompat/24925/2 "2022-06-20T13:43:52Z")

</div>

I think it’s because you define the CHANNEL\_ID as an integer and not a **string**.

Went through the same issue and that was my problem. Hope it helps 😉

```auto
private var CHANNEL_ID = "22222"
//instead of 
private var CHANNEL_ID = 22222

```
